an example would be…
Pets.find(:all, :select => 'count(*) count, pet_type', :group => 'pet_type', :order => 'count')
returns the correct results but not the actual counts in the orderedhash object returned.
Pets.count(:all, :group => 'pet_type')
returns the count but are not sorting in a descending fashion… how would i do this?
I think i’d prefer to use .find .. but i’ll take .count if i can sort it.
1 Answer