Categorizing by created_at

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

Use group_by: http://api.rubyonrails.org/classes/Enumerable.html#M001645

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs