From 586baf8ffea46f9daa96df7c0258591d89f57aeb Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 29 Jul 2009 21:33:27 -0500 Subject: read_attribute is always available through attribute --- activerecord/lib/active_record/attribute_methods.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index b41c7ffdab..ef510a1a2c 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -146,8 +146,6 @@ module ActiveRecord else super end - elsif @attributes.include?(method_name) - read_attribute(method_name) else super end @@ -172,11 +170,7 @@ module ActiveRecord end end - if @attributes.nil? - return super - elsif @attributes.include?(method_name) - return true - elsif md = self.class.match_attribute_method?(method_name) + if md = self.class.match_attribute_method?(method_name) return true if @attributes.include?(md.pre_match) end super -- cgit v1.2.3