diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-07-29 21:33:27 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-07-30 17:54:00 -0500 |
commit | 586baf8ffea46f9daa96df7c0258591d89f57aeb (patch) | |
tree | 79a571ad4812f2307a7eaeb03a883fbbb0defeaf /activerecord/lib/active_record/attribute_methods.rb | |
parent | bd07c5ca8e67c93885d96a24dcf1167d6d503a8c (diff) | |
download | rails-586baf8ffea46f9daa96df7c0258591d89f57aeb.tar.gz rails-586baf8ffea46f9daa96df7c0258591d89f57aeb.tar.bz2 rails-586baf8ffea46f9daa96df7c0258591d89f57aeb.zip |
read_attribute is always available through attribute
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 8 |
1 files changed, 1 insertions, 7 deletions
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 |