Rob Biedenharn wrote in post #972262:
> On Jan 4, 2011, at 10:57 AM, Marnen Laibow-Koser wrote:
>
>>>                             (results.assoc(d) || [nil,0])[1]] }
>>
>> Or better yet, use User.count instead of .find .
>
> But the OP wanted counts by day, not a single total.

Right.  That's what count with :group is for.

>
> -Rob

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to