Hi,
I would like to do something simple yet I’m confused.
Lets say I have a table with 2 fields: rank, updated_at.
I would like to show all records matching this condition:
rank = rank â?? (Time.now.to_time â?? Updated_at.to_time)
As you can see this is supposed to be a calculation on the field.
How do I write a query to show this?
I’ve tried with_scope, and regular find but did not succeed.
Please advice
Thanks
Adi