aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
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")