Skip to content

Commit

Permalink
Fix remove column call to work in Rails 3 and 4
Browse files Browse the repository at this point in the history
Removes `column_type` and `column_options` so that it works well in both
versions.

Backcported from master, to release a patch version with this bugfix.

[closes thoughtbot#1947]
  • Loading branch information
andrewhubbs authored and tute committed Sep 10, 2015
1 parent 3cb1331 commit d331f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paperclip/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def remove_attachment(table_name, *attachment_names)
attachment_names.each do |attachment_name|
COLUMNS.each_pair do |column_name, column_type|
column_options = options.merge(options[column_name.to_sym] || {})
remove_column(table_name, "#{attachment_name}_#{column_name}", column_type, column_options)
remove_column(table_name, "#{attachment_name}_#{column_name}")
end
end
end
Expand Down

0 comments on commit d331f3a

Please sign in to comment.