aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-02-05 08:52:59 +0100
committerYves Senn <yves.senn@gmail.com>2014-02-05 08:52:59 +0100
commit3ba0eeda02e85c312d2867afc4aa9afea50d93ec (patch)
tree89f7eb762c154522b00484e54e01dd3f28e10ff2 /activerecord/lib
parentf92142dce19906cd62382f7938cd748dd48b7d65 (diff)
downloadrails-3ba0eeda02e85c312d2867afc4aa9afea50d93ec.tar.gz
rails-3ba0eeda02e85c312d2867afc4aa9afea50d93ec.tar.bz2
rails-3ba0eeda02e85c312d2867afc4aa9afea50d93ec.zip
docs, AR already auto-detects primary keys. Closes #13946. [ci skip]
This behavior was introduced since Rails 3.1 (207f266ccaaa9cd04cd2a7513ae5598c4358b510) but the docs were still out of date.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb6
1 files changed, 3 insertions, 3 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 88bf15bc18..ad069f5e53 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -120,9 +120,9 @@ module ActiveRecord
# The name of the primary key, if one is to be added automatically.
# Defaults to +id+. If <tt>:id</tt> is false this option is ignored.
#
- # Also note that this just sets the primary key in the table. You additionally
- # need to configure the primary key in the model via +self.primary_key=+.
- # Models do NOT auto-detect the primary key from their table definition.
+ # Note that Active Record models will automatically detect their
+ # primary key. This can be avoided by using +self.primary_key=+ on the model
+ # to define the key explicitly.
#
# [<tt>:options</tt>]
# Any extra options you want appended to the table definition.