From b99a899c9a82c5ecb4ff7c8cf01b8d69ffba02b1 Mon Sep 17 00:00:00 2001 From: ankit1910 Date: Tue, 26 Aug 2014 22:40:08 +0530 Subject: use self instead of #read_attribute --- activerecord/lib/active_record/attribute_methods/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') 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 -- cgit v1.2.3