aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/grouping.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-04 16:50:03 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-04 16:50:03 -0700
commitf413129f37bbbc4100317cb60179f43291e69f8e (patch)
treef640bfb9223d60f7ed46add9f157f30048b245bb /lib/arel/relations/grouping.rb
parent85bc3b417dc4e1ecad76fa89b5d195e2db8f5ff5 (diff)
downloadrails-f413129f37bbbc4100317cb60179f43291e69f8e.tar.gz
rails-f413129f37bbbc4100317cb60179f43291e69f8e.tar.bz2
rails-f413129f37bbbc4100317cb60179f43291e69f8e.zip
Table names seem to be disambiguated.
- Code is a mess, about to undergo some refactoring
Diffstat (limited to 'lib/arel/relations/grouping.rb')
-rw-r--r--lib/arel/relations/grouping.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/relations/grouping.rb b/lib/arel/relations/grouping.rb
index 2815f62b79..e3686f7f28 100644
--- a/lib/arel/relations/grouping.rb
+++ b/lib/arel/relations/grouping.rb
@@ -15,5 +15,13 @@ module Arel
def aggregation?
true
end
+
+ def table_sql(formatter = Sql::TableReference.new(self))
+ to_sql(formatter)
+ end
+
+ def name
+ table.name + '_aggregation'
+ end
end
end \ No newline at end of file