Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Rails >6 add_column and column receive keyword arguments now #2671

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/paperclip/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_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] || {})
add_column(table_name, "#{attachment_name}_#{column_name}", column_type, column_options)
add_column(table_name, "#{attachment_name}_#{column_name}", column_type, *column_options)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [101/80]

end
end
end
Expand All @@ -51,7 +51,7 @@ def attachment(*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] || {})
column("#{attachment_name}_#{column_name}", column_type, column_options)
column("#{attachment_name}_#{column_name}", column_type, *column_options)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [85/80]

end
end
end
Expand Down