[Rails] Re: Design Pattern

2010-02-08 Thread eggie5
Another question related to this... I have everything grouped by common date, but now I want to do it my month. Any ideas? On Feb 4, 4:08 am, Rick DeNatale wrote: > On Wed, Feb 3, 2010 at 3:58 AM, eggie5 wrote: > > Hi, > > > I have a collection of arbitrary objects that have a date attribute. I

[Rails] Re: Design Pattern

2010-02-05 Thread eggie5
Thanks, this is what I was looking for.. not just a flat collection sorted by date but sorted by date with sub objects ( I don't know how to explain better). On Feb 4, 4:08 am, Rick DeNatale wrote: > On Wed, Feb 3, 2010 at 3:58 AM, eggie5 wrote: > > Hi, > > > I have a collection of arbitrary obj

[Rails] Re: Design Pattern

2010-02-03 Thread Aldric Giacomoni
eggie5 wrote: > Hi, > > I have a collection of arbitrary objects that have a date attribute. I > want to display these objects by month. For example > > @things=Thing.all > > Now I want to display in a table all the things by month - how can I > do this? the problem isn't making a table or anyth

[Rails] Re: Design Pattern

2010-02-03 Thread Marnen Laibow-Koser
Sharagoz -- wrote: > To work on the day/month/date portion of a date (mysql) Not just mySQL. This is standard SQL syntax. > use > DAY(your_date) MONTH(your_date) YEAR(your_date). > > For instance > @things = Thing.all(:conditions => "YEAR(created_at)=2009") Best, --  Marnen Laibow-Koser htt

[Rails] Re: Design Pattern

2010-02-03 Thread Sharagoz --
To work on the day/month/date portion of a date (mysql) use DAY(your_date) MONTH(your_date) YEAR(your_date). For instance @things = Thing.all(:conditions => "YEAR(created_at)=2009") -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goog