I’d like to get single values from the DB. For example…
SELECT COUNT(*) freaks WHERE status=‘freaky’;
I’m not sure how to approach that in Rails. Seems like ActiveRecord is
all about getting an object or array of objects.
Of course I could just…
and then get the length of the array. But that seems wasteful. Maybe
not. Is that what people normally do?
Any help would be appreciated.