aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdelkader Boudih <terminale@gmail.com>2015-06-12 09:17:59 +0100
committerAbdelkader Boudih <terminale@gmail.com>2015-06-12 09:17:59 +0100
commit40ffcd88a6a3129d8b9eb9f4dc077d8fd00aeb54 (patch)
tree7b35f889fdf25e6f85d5d6d331b1601ac84cc0a6
parent0965be14e22c4d1fd6befda4fd3efb942e0701ca (diff)
parent95de0f01e06564bad3d598824a8cf63d3756dc98 (diff)
downloadrails-40ffcd88a6a3129d8b9eb9f4dc077d8fd00aeb54.tar.gz
rails-40ffcd88a6a3129d8b9eb9f4dc077d8fd00aeb54.tar.bz2
rails-40ffcd88a6a3129d8b9eb9f4dc077d8fd00aeb54.zip
Merge pull request #20526 from y-yagi/fix_doc_about_foreign_key_name
fix doc about foreign key name [ci skip]
-rw-r--r--guides/source/active_record_migrations.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/active_record_migrations.md b/guides/source/active_record_migrations.md
index 80b1bde1c7..ad069a112e 100644
--- a/guides/source/active_record_migrations.md
+++ b/guides/source/active_record_migrations.md
@@ -475,7 +475,8 @@ column names can not be derived from the table names, you can use the
`:column` and `:primary_key` options.
Rails will generate a name for every foreign key starting with
-`fk_rails_` followed by 10 random characters.
+`fk_rails_` followed by 10 character which is deterministically
+generated from the `from_table` and `column`.
There is a `:name` option to specify a different name if needed.
NOTE: Active Record only supports single column foreign keys. `execute` and