Record.where('created_at < ?', 1.minute.ago).order(created_at: :desc)
The important thing is ('created_at <?', 〇〇)
Just enter your favorite conditions in 〇〇.
1 hour ago 1.hour.ago
One day ago 1.day.ago
Are there any methods or better practices that don't use quotation marks?
The information was unexpectedly difficult to find. .. ..
Recommended Posts