diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-08-20 21:18:38 -0700 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-08-20 21:18:38 -0700 |
commit | bfd7e8ac4c8da17b98c7f1c1a307b1295bc32c3b (patch) | |
tree | 371511849a0aa907139fdea5194baa445e338334 | |
parent | 3ec6cc70f34a553d36c778731105d3351ccc6bef (diff) | |
parent | df52eee15fc63b5224c0ff993c748ae9784b5b63 (diff) | |
download | rails-bfd7e8ac4c8da17b98c7f1c1a307b1295bc32c3b.tar.gz rails-bfd7e8ac4c8da17b98c7f1c1a307b1295bc32c3b.tar.bz2 rails-bfd7e8ac4c8da17b98c7f1c1a307b1295bc32c3b.zip |
Merge pull request #11952 from lmarcetic/master
Remove set_primary_key, replace with primary_key=
-rw-r--r-- | guides/source/active_record_basics.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index 556c2544ff..bff60efc33 100644 --- a/guides/source/active_record_basics.md +++ b/guides/source/active_record_basics.md @@ -188,11 +188,11 @@ end ``` It's also possible to override the column that should be used as the table's -primary key using the `ActiveRecord::Base.set_primary_key` method: +primary key using the `ActiveRecord::Base.primary_key=` method: ```ruby class Product < ActiveRecord::Base - set_primary_key "product_id" + self.primary_key = "product_id" end ``` |