From df52eee15fc63b5224c0ff993c748ae9784b5b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Mar=C4=8Deti=C4=87?= Date: Wed, 21 Aug 2013 04:54:27 +0200 Subject: [PATCH] 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 --- guides/source/active_record_basics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index 556c2544ff36c..bff60efc33ddb 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 ```