Merge pull request #35105 from olivierlacan/document-table-foreign-key

Hint at advanced options for foreign_key
This commit is contained in:
Gannon McGibbon 2019-02-02 16:08:55 -05:00 committed by GitHub
commit 00f7dbab75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -682,9 +682,10 @@ def remove_references(*args, **options)
end
alias :remove_belongs_to :remove_references
# Adds a foreign key.
# Adds a foreign key to the table using a supplied table name.
#
# t.foreign_key(:authors)
# t.foreign_key(:authors, column: :author_id, primary_key: "id")
#
# See {connection.add_foreign_key}[rdoc-ref:SchemaStatements#add_foreign_key]
def foreign_key(*args)