Hi, I'd like to get the objects that are updated in the last 10 seconds from the ActiveRecord's find.
I tried doing this
@chats = Chat.find(:all, :conditions => ["updated_at > ?", 10.seconds.ago] )
as well as
@chats = Chat.find(:all, :conditions => ["updated_at > ?", Time.now-10.seconds] )
and even
@chats = Chat.find(:all, :conditions => {:updated_at => 10.seconds.ago..0.seconds.ago}]
But I still can't get it to work :(
EDIT: I am updating the column from another application to keep it alive and I'm looking at all the rows I kept alive in the last 10 seconds, to dispose the dead chats.