aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/sql/formatters.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/sql/formatters.rb')
-rw-r--r--lib/arel/sql/formatters.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arel/sql/formatters.rb b/lib/arel/sql/formatters.rb
index 96bab2495c..5eab65726e 100644
--- a/lib/arel/sql/formatters.rb
+++ b/lib/arel/sql/formatters.rb
@@ -44,6 +44,12 @@ module Arel
end
end
+ class GroupClause < PassThrough
+ def attribute(attribute)
+ "#{quote_table_name(name_for(attribute.original_relation))}.#{quote_column_name(attribute.name)}"
+ end
+ end
+
class WhereCondition < Formatter
def attribute(attribute)
"#{quote_table_name(name_for(attribute.original_relation))}.#{quote_column_name(attribute.name)}"