1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

passing splat keyword arguments as a single Hash

Ruby 2.6.0 warns about this.
This commit is contained in:
utilum 2018-04-04 11:05:07 +02:00
parent a07d068078
commit 73e9b854d8
2 changed files with 4 additions and 3 deletions

View file

@ -1970,7 +1970,7 @@ module ActionView
convert_to_legacy_options(options)
fields_for(scope || model, model, **options, &block)
fields_for(scope || model, model, options, &block)
end
# Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object

View file

@ -305,7 +305,8 @@ module ActiveRecord
yield td if block_given?
if options[:force]
drop_table(table_name, **options, if_exists: true)
drop_opts = { if_exists: true }.merge(**options)
drop_table(table_name, drop_opts)
end
result = execute schema_creation.accept td
@ -908,7 +909,7 @@ module ActiveRecord
foreign_key_options = { to_table: reference_name }
end
foreign_key_options[:column] ||= "#{ref_name}_id"
remove_foreign_key(table_name, **foreign_key_options)
remove_foreign_key(table_name, foreign_key_options)
end
remove_column(table_name, "#{ref_name}_id")