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,
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
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:/
3 matches
Mail list logo