Permalink
Browse files

Improve example for having()

  • Loading branch information...
1 parent 6ba6463 commit c1915f5ff35d8655de128f4d8ebf67b57e2ed059 @lifo lifo committed with fxn Aug 30, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/active_record_querying.textile
@@ -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:

0 comments on commit c1915f5

Please sign in to comment.