diff options
author | Luka Marčetić <paxcoder@gmail.com> | 2013-08-21 04:54:27 +0200 |
---|---|---|
committer | Luka Marčetić <paxcoder@gmail.com> | 2013-08-21 04:54:27 +0200 |
commit | df52eee15fc63b5224c0ff993c748ae9784b5b63 (patch) | |
tree | 371511849a0aa907139fdea5194baa445e338334 /guides/source | |
parent | 3ec6cc70f34a553d36c778731105d3351ccc6bef (diff) | |
download | rails-df52eee15fc63b5224c0ff993c748ae9784b5b63.tar.gz rails-df52eee15fc63b5224c0ff993c748ae9784b5b63.tar.bz2 rails-df52eee15fc63b5224c0ff993c748ae9784b5b63.zip |
Remove set_primary_key, replace with primary_key=
First deprecated, now removed: https://github.com/rails/rails/commit/9add7608f1acaa68b025470e7a38901d7e6161ca#activerecord/lib/active_record/attribute_methods/primary_key.rb
Diffstat (limited to 'guides/source')
-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 ``` |