Skip to content

Commit

Permalink
Merge pull request #11952 from lmarcetic/master
Browse files Browse the repository at this point in the history
Remove set_primary_key, replace with primary_key=
  • Loading branch information
guilleiguaran committed Aug 21, 2013
2 parents 3ec6cc7 + df52eee commit bfd7e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/source/active_record_basics.md
Expand Up @@ -188,11 +188,11 @@ end
``` ```


It's also possible to override the column that should be used as the table's 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 ```ruby
class Product < ActiveRecord::Base class Product < ActiveRecord::Base
set_primary_key "product_id" self.primary_key = "product_id"
end end
``` ```


Expand Down

0 comments on commit bfd7e8a

Please sign in to comment.