aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/aggregations.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-07 14:10:46 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-07 14:10:46 -0800
commit6e63e7a8745083e2a2556df268589f8bd9e7cd31 (patch)
treeb471edc5f8841b4053b729e44218f381be359c47 /activerecord/lib/active_record/aggregations.rb
parent344a2d5adca154a4d13539421bdf5ea7865e0235 (diff)
downloadrails-6e63e7a8745083e2a2556df268589f8bd9e7cd31.tar.gz
rails-6e63e7a8745083e2a2556df268589f8bd9e7cd31.tar.bz2
rails-6e63e7a8745083e2a2556df268589f8bd9e7cd31.zip
no need for parens
Diffstat (limited to 'activerecord/lib/active_record/aggregations.rb')
-rw-r--r--activerecord/lib/active_record/aggregations.rb2
1 files changed, 1 insertions, 1 deletions
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