diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-01 11:27:21 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-01 11:27:21 -0300 |
commit | fcbdac7e82725c388bf5adf56a9a9a16d4efdbe0 (patch) | |
tree | fd3fbd145a9318d2139302bedbe6c0f25e1499f3 /activerecord/lib/active_record/attribute_methods | |
parent | a4ecc64959613a5be0fc933fd57beb43c5de27a6 (diff) | |
parent | b99a899c9a82c5ecb4ff7c8cf01b8d69ffba02b1 (diff) | |
download | rails-fcbdac7e82725c388bf5adf56a9a9a16d4efdbe0.tar.gz rails-fcbdac7e82725c388bf5adf56a9a9a16d4efdbe0.tar.bz2 rails-fcbdac7e82725c388bf5adf56a9a9a16d4efdbe0.zip |
Merge pull request #16704 from ankit1910/use-existing-method
use self instead of #read_attribute
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/query.rb | 2 |
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 |