Iterating through a collection by date

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:



  <li>Name 1</li>
  <li>Name 2</li>

  <li>Name 3</li>
  <li>Name 4</li>

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.


On 10/27/06, Andrew H. [email protected] wrote:

Ed Hickey
Litmus Media
[email protected]
A Member of Think Partnership, Inc
Amex ticker symbol: THK

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