Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4610

How to find record depending upon the updated_at in rails

$
0
0

I have to find the record depending upon their updated_at column. For this I am comparing updated_at with todays date. I tired in following ways but it wont worked

todays_date = Date.today.strftime("%m/%d/%Y")obj = MyClass.where(:updated_at.strftime("%m/%d/%Y")=> todays_date )

But it is not working. How can I do this?


Viewing all articles
Browse latest Browse all 4610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>