From 3a40d386194cf6d572b145cea0da57c286204554 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 1 Dec 2011 11:24:30 +0000 Subject: Get rid of the underscore versions of attribute methods! This makes me happy! --- activerecord/lib/active_record/attribute_methods/primary_key.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/attribute_methods/primary_key.rb') 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 -- cgit v1.2.3