diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-01 11:24:30 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-01 23:41:51 +0000 |
commit | 3a40d386194cf6d572b145cea0da57c286204554 (patch) | |
tree | 2d8d28049fa7baef3b0dd440dcbcde315c4ed6bb /activerecord/lib/active_record/attribute_methods/primary_key.rb | |
parent | 3dcb127109428c1948a9f3bcad7101bd8a7f4d8a (diff) | |
download | rails-3a40d386194cf6d572b145cea0da57c286204554.tar.gz rails-3a40d386194cf6d572b145cea0da57c286204554.tar.bz2 rails-3a40d386194cf6d572b145cea0da57c286204554.zip |
Get rid of the underscore versions of attribute methods!
This makes me happy!
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/primary_key.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/primary_key.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb index 6eff716703..98aa1ed225 100644 --- a/activerecord/lib/active_record/attribute_methods/primary_key.rb +++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb @@ -13,7 +13,6 @@ module ActiveRecord def id read_attribute(self.class.primary_key) end - alias _id id # Sets the primary key value def id=(value) @@ -27,7 +26,7 @@ module ActiveRecord module ClassMethods def dangerous_attribute_method?(method_name) - super && !['id', 'id=', 'id?', '_id'].include?(method_name) + super && !['id', 'id=', 'id?'].include?(method_name) end # Defines the primary key field -- can be overridden in subclasses. Overwriting will negate any effect of the |