Q:

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

A:

How about this:
record.last_activity_at > 1.minute.ago

