Flowdock
method

count

Importance_1
v3.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::AssociationCollection
count(column_name = nil, options = {}) public

Count all records using SQL. If the :counter_sql option is set for the association, it will be used for the query. If no :counter_sql was supplied, but :finder_sql was set, the descendant’s construct_sql method will have set :counter_sql automatically. Otherwise, construct options and pass them with scope to the target class’s count.

Show source
Register or log in to add new notes.