Is it possible to select all records from a table, then iterate through
the returned objects grouped by a datetime field?
I have a table that has a datetime field called, well, ‘datetime’, and a
string field called (for example’s sake) ‘name’.
What I need to end up with is something along the lines of:
<h2>1</h2> <ul> <li>Name 1</li> <li>Name 2</li> </ul>
<h2>2</h2> <ul> <li>Name 3</li> <li>Name 4</li> </ul>
How can I achieve this using Ruby/Rails? I can do it pretty easily
using PHP, but I’m not sure how best to approach it w/ Ruby.