From ceca3a0564000024e2bbb273a431c3063f2011c5 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 30 Aug 2010 23:23:29 +0100 Subject: Improve example for having() --- railties/guides/source/active_record_querying.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/guides/source/active_record_querying.textile') 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: -Order.group("date(created_at)".having(["created_at > ?", 1.month.ago]) +Order.group("date(created_at)".having("created_at > ?", 1.month.ago) The SQL that would be executed would be something like this: -- cgit v1.2.3