You have to use .size
not .total
You have to use .size
not .total
Use the ActiveRecord::Calculations::Class Methods
i.e. Model.count(:conditions => "...")
(look it up on api.rubyonrails.org for more details)
Your @c is an array, so @c.first.total should work
Although, if you just want the size along, Model.count would be the best way to go as per E. Litwin suggestion.
s/along/alone