[Rails] Re: Updated today - number of rows

2009-04-11 Thread Jaryl Sim
named_scope :recent, lambda { {:conditions => ['updated_at > ?', 24.hours.ago]} } On Apr 11, 7:25 pm, Fresh Mix wrote: > Frederick Cheung wrote: > > On Apr 11, 11:42 am, Fresh Mix > > wrote: > >> How can I get number of rows that was updated "today"? > > >> Table: messages (id, title, message,

[Rails] Re: Updated today - number of rows

2009-04-11 Thread Fresh Mix
Frederick Cheung wrote: > On Apr 11, 11:42�am, Fresh Mix > wrote: >> How can I get number of rows that was updated "today"? >> >> Table: messages (id, title, message, updated_at) > > Decide on your precise definition of today (since midnight, last 24 > hours etc.) and use ActiveRecord's count me

[Rails] Re: Updated today - number of rows

2009-04-11 Thread Frederick Cheung
On Apr 11, 11:42 am, Fresh Mix wrote: > How can I get number of rows that was updated "today"? > > Table: messages (id, title, message, updated_at) Decide on your precise definition of today (since midnight, last 24 hours etc.) and use ActiveRecord's count method. Fred > -- > Posted viahttp:/