diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-08-30 23:23:29 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-08-30 23:45:03 +0100 |
commit | ceca3a0564000024e2bbb273a431c3063f2011c5 (patch) | |
tree | a51c76a0b1dcae2add250469e2e307a782b59fc9 | |
parent | 767eca491330d6ac1cd506a206e75664b60625c4 (diff) | |
download | rails-ceca3a0564000024e2bbb273a431c3063f2011c5.tar.gz rails-ceca3a0564000024e2bbb273a431c3063f2011c5.tar.bz2 rails-ceca3a0564000024e2bbb273a431c3063f2011c5.zip |
Improve example for having()
-rw-r--r-- | railties/guides/source/active_record_querying.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index f93ff15a75..aa837f7ddf 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/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: |