From 6e63e7a8745083e2a2556df268589f8bd9e7cd31 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 7 Jan 2011 14:10:46 -0800 Subject: no need for parens --- activerecord/lib/active_record/aggregations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 4b1fa5c59c..44e595383e 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -222,7 +222,7 @@ module ActiveRecord def reader_method(name, class_name, mapping, allow_nil, constructor) module_eval do define_method(name) do - if (@aggregation_cache[name].nil?) && (!allow_nil || mapping.any? {|pair| !read_attribute(pair.first).nil? }) + if @aggregation_cache[name].nil? && (!allow_nil || mapping.any? {|pair| !read_attribute(pair.first).nil? }) attrs = mapping.collect {|pair| read_attribute(pair.first)} object = case constructor when Symbol -- cgit v1.2.3