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'

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to