aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-07-29 21:33:27 -0500
committerJoshua Peek <josh@joshpeek.com>2009-07-30 17:54:00 -0500
commit586baf8ffea46f9daa96df7c0258591d89f57aeb (patch)
tree79a571ad4812f2307a7eaeb03a883fbbb0defeaf /activerecord/lib/active_record/attribute_methods.rb
parentbd07c5ca8e67c93885d96a24dcf1167d6d503a8c (diff)
downloadrails-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.rb8
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