Permalink
Browse files

do not need intermediate variable, avoid lasgn

  • Loading branch information...
1 parent 1efeb5c commit cab12076d757fea252635bbbc932658544520e4f @tenderlove tenderlove committed Sep 27, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 activerecord/lib/active_record/base.rb
@@ -1043,8 +1043,9 @@ def expand_attribute_names_for_aggregates(attribute_names)
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

0 comments on commit cab1207

Please sign in to comment.