Use group_by: http://api.rubyonrails.org/classes/Enumerable.html#M001645
On Apr 26, 5:38 pm, ga rg
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hello,
>
> If I have a table with created_at:datetime name:string notes:text
> etc... and I want to display the contents of this table, but I want the
> created_at date, and then all the items created on that date, and then
> the next date, and all the items with that date and so on... what would
> be a good way to do that? I would need to ignore the time in the
> datetime field.
>
> Thanks
> --
> Posted viahttp://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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---