From 3ba0eeda02e85c312d2867afc4aa9afea50d93ec Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 5 Feb 2014 08:52:59 +0100 Subject: 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. --- .../active_record/connection_adapters/abstract/schema_statements.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb') 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 :id 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. # # [:options] # Any extra options you want appended to the table definition. -- cgit v1.2.3