From 818f019711d448a62ee11569f5ca1ba0ddfb3c2c Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Tue, 29 Dec 2009 10:26:51 -0300 Subject: Attributes may be an Arel value which doesn't respond to aggregation?, don't test them. --- lib/arel/algebra/relations/operations/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3