Find last record updated


#1

I always get confused when I have to make a search with Active Record
a little beyond the most ordinaire. How do I find the record that was
updated the last?
It has to be something like

Ad.find :conditions => updated_at = :last

I just don’t know how to code it.


#2

Abel wrote:

I always get confused when I have to make a search with Active Record
a little beyond the most ordinaire. How do I find the record that was
updated the last?
It has to be something like

Ad.find :conditions => updated_at = :last

How about
Ad.find :first, :order => ‘updated_at DESC’