diff --git a/guides/source/active_record_basics.md b/guides/source/active_record_basics.md index 556c2544ff36cebcdbaf107386e19630a6c6f058..bff60efc33ddb504ccaccf40384629217b7c35a4 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 ```