Skip to content
Browse files

Improve example for having()

  • Loading branch information...
1 parent 767eca4 commit ceca3a0564000024e2bbb273a431c3063f2011c5 @lifo lifo committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/active_record_querying.textile
View
2 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 ceca3a0

Please sign in to comment.
Something went wrong with that request. Please try again.