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

fix documentation for SchemaStatements#add_foreign_key

The implementation of the generation of the foreign key name was changed
between Rails 4.2.0 and 4.2.1 from a random to a deterministic behavior,
however the documentation still describes the old randomized behavior.
This commit is contained in:
Simon Stemplinger 2015-04-08 22:02:00 +02:00
parent 991875fc6f
commit 41b2ba5926

View file

@ -690,8 +690,8 @@ module ActiveRecord
# +to_table+ contains the referenced primary key. # +to_table+ contains the referenced primary key.
# #
# The foreign key will be named after the following pattern: <tt>fk_rails_<identifier></tt>. # The foreign key will be named after the following pattern: <tt>fk_rails_<identifier></tt>.
# +identifier+ is a 10 character long random string. A custom name can be specified with # +identifier+ is a 10 character long string which is deterministically generated from the
# the <tt>:name</tt> option. # +from_table+ and +column+. A custom name can be specified with the <tt>:name</tt> option.
# #
# ====== Creating a simple foreign key # ====== Creating a simple foreign key
# #