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

Unify foreign_key method signatures to take keyword arguments

This commit is contained in:
Akira Matsuda 2019-09-24 13:44:07 +09:00
parent deef6a35ed
commit ba0c031148

View file

@ -148,7 +148,7 @@ module ActiveRecord
end
if foreign_key
table.foreign_key(foreign_table_name, foreign_key_options)
table.foreign_key(foreign_table_name, **foreign_key_options)
end
end
@ -394,7 +394,7 @@ module ActiveRecord
indexes << [column_name, options]
end
def foreign_key(table_name, options = {}) # :nodoc:
def foreign_key(table_name, **options) # :nodoc:
foreign_keys << [table_name, options]
end