aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-05 13:00:50 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-05 13:00:50 -0700
commit680e080bb4399312f63a699d2f103632b41be927 (patch)
treee2f6bc304622aa6913479ef74f797c62cc43f4b1 /lib/arel/relations
parentb9e90e4e55290172d7c5918319fd5fe35aa6a10e (diff)
downloadrails-680e080bb4399312f63a699d2f103632b41be927.tar.gz
rails-680e080bb4399312f63a699d2f103632b41be927.tar.bz2
rails-680e080bb4399312f63a699d2f103632b41be927.zip
string passthrough for "group by"
Diffstat (limited to 'lib/arel/relations')
-rw-r--r--lib/arel/relations/relation.rb2
1 files changed, 1 insertions, 1 deletions
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