diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-04-04 17:31:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-04 17:31:58 -0400 |
commit | 7252c2133f6f44085c64b1876cf41902e6a73847 (patch) | |
tree | 0d9737257d273a15d9e293aa13ef4f1f2a1a053f | |
parent | 4c2625b7bec63ceb085e62f57ce785608fccf528 (diff) | |
parent | 73e9b854d87f52b1028636100ae8aecf45540fd0 (diff) | |
download | rails-7252c2133f6f44085c64b1876cf41902e6a73847.tar.gz rails-7252c2133f6f44085c64b1876cf41902e6a73847.tar.bz2 rails-7252c2133f6f44085c64b1876cf41902e6a73847.zip |
Merge pull request #32447 from utilum/splat
2.6 warnings: passing splat keyword arguments as a single Hash
-rw-r--r-- | actionview/lib/action_view/helpers/form_helper.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb index afd49286e6..2d5c5684c1 100644 --- a/actionview/lib/action_view/helpers/form_helper.rb +++ b/actionview/lib/action_view/helpers/form_helper.rb @@ -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 diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index e2147b7fcf..ac73337aef 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -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") |