compare datetime in find conditions

Posted by Luca Romagnoli on Stack Overflow See other posts from Stack Overflow or by Luca Romagnoli
Published on 2010-04-01T15:33:24Z Indexed on 2010/04/01 17:33 UTC
Read the original article Hit count: 265

Filed under:
|
|

Hi, I am trying to get all users that are updated maximum 90 seconds ago:

User.find(:all, :include => { :core => :image }, 
      :conditions => ["updated_at > ?", Time.now - 90.seconds] )

But it doesn't work.

why?

how can i do?

thanks

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about datetime