Commit d331f3a7 by Andrew Hubbs Committed by Tute Costa

Fix remove column call to work in Rails 3 and 4

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 #1947]
parent 3cb13318
...@@ -40,7 +40,7 @@ module Paperclip ...@@ -40,7 +40,7 @@ module Paperclip
attachment_names.each do |attachment_name| attachment_names.each do |attachment_name|
COLUMNS.each_pair do |column_name, column_type| COLUMNS.each_pair do |column_name, column_type|
column_options = options.merge(options[column_name.to_sym] || {}) 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 end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment