aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorSimon Stemplinger <simon@stem.ps>2015-04-08 22:02:00 +0200
committerSimon Stemplinger <simon@stem.ps>2015-04-08 22:02:00 +0200
commit41b2ba5926ab01be517c8e8c51cc168b1cb00837 (patch)
tree5ad26dac131df6e9369395457d2f261197c9f07f /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parent991875fc6f04625425fdf4cff8d350cf3f91f858 (diff)
downloadrails-41b2ba5926ab01be517c8e8c51cc168b1cb00837.tar.gz
rails-41b2ba5926ab01be517c8e8c51cc168b1cb00837.tar.bz2
rails-41b2ba5926ab01be517c8e8c51cc168b1cb00837.zip
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.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index ab1b098e53..f0909aabb5 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -690,8 +690,8 @@ module ActiveRecord
# +to_table+ contains the referenced primary key.
#
# 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
- # the <tt>:name</tt> option.
+ # +identifier+ is a 10 character long string which is deterministically generated from the
+ # +from_table+ and +column+. A custom name can be specified with the <tt>:name</tt> option.
#
# ====== Creating a simple foreign key
#