diff options
author | utilum <oz@utilum.com> | 2018-04-04 11:05:07 +0200 |
---|---|---|
committer | utilum <oz@utilum.com> | 2018-04-04 11:05:14 +0200 |
commit | 73e9b854d87f52b1028636100ae8aecf45540fd0 (patch) | |
tree | 60009e6ded185fb23b7f920c7464cfe4ce0c2606 /activerecord/lib/active_record/connection_adapters | |
parent | a07d0680787ced3c04b362fa7a238c918211ac70 (diff) | |
download | rails-73e9b854d87f52b1028636100ae8aecf45540fd0.tar.gz rails-73e9b854d87f52b1028636100ae8aecf45540fd0.tar.bz2 rails-73e9b854d87f52b1028636100ae8aecf45540fd0.zip |
passing splat keyword arguments as a single Hash
Ruby 2.6.0 warns about this.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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") |