From 680e080bb4399312f63a699d2f103632b41be927 Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Mon, 5 May 2008 13:00:50 -0700 Subject: string passthrough for "group by" --- lib/arel/relations/relation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/arel/relations') diff --git a/lib/arel/relations/relation.rb b/lib/arel/relations/relation.rb index 8c56a0cdcc..cd58f0f15c 100644 --- a/lib/arel/relations/relation.rb +++ b/lib/arel/relations/relation.rb @@ -11,7 +11,7 @@ module Arel (joins(self) unless joins(self).blank? ), ("WHERE #{selects.collect { |s| s.to_sql(Sql::WhereClause.new(self)) }.join("\n\tAND ")}" unless selects.blank? ), ("ORDER BY #{orders.collect { |o| o.to_sql(Sql::OrderClause.new(self)) }.join(', ')}" unless orders.blank? ), - ("GROUP BY #{groupings.collect(&:to_sql)}" unless groupings.blank? ), + ("GROUP BY #{groupings.collect { |g| g.to_sql(Sql::GroupClause.new(self)) }.join(', ')}" unless groupings.blank? ), ("LIMIT #{taken}" unless taken.blank? ), ("OFFSET #{skipped}" unless skipped.blank? ) ].compact.join("\n"), name -- cgit v1.2.3