group objects by month

eggie5
2010-04-07T02:35:23Z

I have a collection of of objects from an query. I can group them by
using:

@dogs.group_by(&:birth_date)

that works fine... and it groups them by date, however, I want to
group them by month. How can I do this?

--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org