aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-12-29 10:26:51 -0300
committerEmilio Tagua <miloops@gmail.com>2009-12-29 10:26:51 -0300
commit818f019711d448a62ee11569f5ca1ba0ddfb3c2c (patch)
treee1eaf508564ab21a82b59eb65173fd025c47a4d4 /lib
parentbd00a461e042a77aef48822040897467c544cd1a (diff)
downloadrails-818f019711d448a62ee11569f5ca1ba0ddfb3c2c.tar.gz
rails-818f019711d448a62ee11569f5ca1ba0ddfb3c2c.tar.bz2
rails-818f019711d448a62ee11569f5ca1ba0ddfb3c2c.zip
Attributes may be an Arel value which doesn't respond to aggregation?, don't test them.
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/algebra/relations/operations/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/operations/project.rb b/lib/arel/algebra/relations/operations/project.rb
index 223d320e22..a1140e91c1 100644
--- a/lib/arel/algebra/relations/operations/project.rb
+++ b/lib/arel/algebra/relations/operations/project.rb
@@ -14,7 +14,7 @@ module Arel
end
def externalizable?
- attributes.any?(&:aggregation?) or relation.externalizable?
+ attributes.any? { |a| a.respond_to?(:aggregation?) && a.aggregation? } || relation.externalizable?
end
end
end