aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorankit1910 <ankit.bansal@vinsol.com>2014-08-26 22:40:08 +0530
committerankit1910 <ankit.bansal@vinsol.com>2014-08-26 22:40:08 +0530
commitb99a899c9a82c5ecb4ff7c8cf01b8d69ffba02b1 (patch)
tree2e886f2bbb26d4fd8d9f1e417c521154ac4574a5 /activerecord
parent3fe54b3a058509a52bc55bbf1c8bbc308c596891 (diff)
downloadrails-b99a899c9a82c5ecb4ff7c8cf01b8d69ffba02b1.tar.gz
rails-b99a899c9a82c5ecb4ff7c8cf01b8d69ffba02b1.tar.bz2
rails-b99a899c9a82c5ecb4ff7c8cf01b8d69ffba02b1.zip
use self instead of #read_attribute
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods/query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/query.rb b/activerecord/lib/active_record/attribute_methods/query.rb
index 0f9723febb..dc689f399a 100644
--- a/activerecord/lib/active_record/attribute_methods/query.rb
+++ b/activerecord/lib/active_record/attribute_methods/query.rb
@@ -8,7 +8,7 @@ module ActiveRecord
end
def query_attribute(attr_name)
- value = read_attribute(attr_name) { |n| missing_attribute(n, caller) }
+ value = self[attr_name]
case value
when true then true