diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-12-28 12:58:30 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-12-28 12:58:30 -0300 |
commit | bd00a461e042a77aef48822040897467c544cd1a (patch) | |
tree | 8272c2d78da319bde1ab6d736ce6f66b352a25e6 /lib/arel/engines/sql/formatters.rb | |
parent | 4fe6bdf195336d54b082ca26b96c5294d8aae3d1 (diff) | |
download | rails-bd00a461e042a77aef48822040897467c544cd1a.tar.gz rails-bd00a461e042a77aef48822040897467c544cd1a.tar.bz2 rails-bd00a461e042a77aef48822040897467c544cd1a.zip |
Added having to use in combination with group to filter records.
Diffstat (limited to 'lib/arel/engines/sql/formatters.rb')
-rw-r--r-- | lib/arel/engines/sql/formatters.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/arel/engines/sql/formatters.rb b/lib/arel/engines/sql/formatters.rb index 626803a887..e05dc3eb93 100644 --- a/lib/arel/engines/sql/formatters.rb +++ b/lib/arel/engines/sql/formatters.rb @@ -57,6 +57,12 @@ module Arel end end + class HavingClause < PassThrough + def attribute(attribute) + attribute + end + end + class WhereCondition < Formatter def attribute(attribute) "#{quote_table_name(name_for(attribute.original_relation))}.#{quote_column_name(attribute.name)}" |