Permalink
Browse files

read_attribute is always available through attribute

  • Loading branch information...
1 parent bd07c5c commit 586baf8ffea46f9daa96df7c0258591d89f57aeb @josh josh committed Jul 30, 2009
Showing with 1 addition and 7 deletions.
  1. +1 −7 activerecord/lib/active_record/attribute_methods.rb
@@ -146,8 +146,6 @@ def method_missing(method_id, *args, &block)
else
super
end
- elsif @attributes.include?(method_name)
- read_attribute(method_name)
else
super
end
@@ -172,11 +170,7 @@ def respond_to?(method, include_private_methods = false)
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

0 comments on commit 586baf8

Please sign in to comment.