diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-27 16:19:14 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-27 16:20:46 -0700 |
commit | f6ef4d383edd0403e5c2bb8390c9fec9f0843722 (patch) | |
tree | 44a4e82d1eaaf1d210e93bdcbac0cf32fc571c50 /activerecord/lib/active_record | |
parent | ff5b3f5c3aa36e19f2aad5e9d64f0710e81a555d (diff) | |
download | rails-f6ef4d383edd0403e5c2bb8390c9fec9f0843722.tar.gz rails-f6ef4d383edd0403e5c2bb8390c9fec9f0843722.tar.bz2 rails-f6ef4d383edd0403e5c2bb8390c9fec9f0843722.zip |
do not need intermediate variable, avoid lasgn
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index f5291b180e..a9361f96f0 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1014,8 +1014,9 @@ module ActiveRecord #:nodoc: end def all_attributes_exists?(attribute_names) - attribute_names = expand_attribute_names_for_aggregates(attribute_names) - attribute_names.all? { |name| column_methods_hash.include?(name.to_sym) } + expand_attribute_names_for_aggregates(attribute_names).all? { |name| + column_methods_hash.include?(name.to_sym) + } end protected |