1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Improve example for having()

This commit is contained in:
Pratik Naik 2010-08-30 23:23:29 +01:00
parent 767eca4913
commit ceca3a0564

View file

@ -496,7 +496,7 @@ SQL uses the +HAVING+ clause to specify conditions on the +GROUP BY+ fields. You
For example:
<ruby>
Order.group("date(created_at)".having(["created_at > ?", 1.month.ago])
Order.group("date(created_at)".having("created_at > ?", 1.month.ago)
</ruby>
The SQL that would be executed would be something like this: