aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-06-12 09:35:08 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2015-06-12 09:39:18 +0900
commit95de0f01e06564bad3d598824a8cf63d3756dc98 (patch)
treec39dd43ff6b6ed9f3ec4f5fc698a1888ea964579
parent21f7bcbaa7709ed072bb2e1273d25c09eeaa26d9 (diff)
downloadrails-95de0f01e06564bad3d598824a8cf63d3756dc98.tar.gz
rails-95de0f01e06564bad3d598824a8cf63d3756dc98.tar.bz2
rails-95de0f01e06564bad3d598824a8cf63d3756dc98.zip
fix doc about foreign key name [ci skip]
this behavior was changed in b8e1f202676b4788c56241b124c401beff9f4014
-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