ActiveRecord::Querying

module ActiveRecord::Querying

Public Instance Methods

count_by_sql(sql) Show source

Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. The use of this method should be restricted to complicated SQL queries that can't be executed using the ActiveRecord::Calculations class methods. Look into those before using this.

Parameters