How to determine if the last_seen_at Time field is great than 1 minute ago

In my Room model I have a field last_activity_at

I want to do something like

if last_activity_at is greater than 1 minute ago?

What's the right way in rails to do that? Thanks

-------------Problems Reply------------

How about this:

record.last_activity_at > 1.minute.ago

Category:ruby on rails Views:0 Time:2011-09-21

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.099 (s). 11 q(s)