diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-05 13:00:50 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-05 13:00:50 -0700 |
commit | 680e080bb4399312f63a699d2f103632b41be927 (patch) | |
tree | e2f6bc304622aa6913479ef74f797c62cc43f4b1 /lib/arel/sql/formatters.rb | |
parent | b9e90e4e55290172d7c5918319fd5fe35aa6a10e (diff) | |
download | rails-680e080bb4399312f63a699d2f103632b41be927.tar.gz rails-680e080bb4399312f63a699d2f103632b41be927.tar.bz2 rails-680e080bb4399312f63a699d2f103632b41be927.zip |
string passthrough for "group by"
Diffstat (limited to 'lib/arel/sql/formatters.rb')
-rw-r--r-- | lib/arel/sql/formatters.rb | 6 |
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)}" |