From e17bf81823454f490f4df972b570dd54d509e386 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sun, 14 Aug 2005 08:20:51 +0000 Subject: Fix typo in count_by_sql documentation #1969 [Alexey Verkhovsky] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 84bf0cdcff..16554ffb55 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -458,7 +458,7 @@ module ActiveRecord #:nodoc: end # Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. - # Product.count "SELECT COUNT(*) FROM sales s, customers c WHERE s.customer_id = c.id" + # Product.count_by_sql "SELECT COUNT(*) FROM sales s, customers c WHERE s.customer_id = c.id" def count_by_sql(sql) sql = sanitize_conditions(sql) rows = connection.select_one(sql, "#{name} Count") -- cgit v1.2.3