Tjek Rails-vejledningerne om rækkeviddeforhold:
Client.where(created_at: (Time.now.midnight - 1.day)..Time.now.midnight)
Det vil producere følgende SQL:
SELECT * FROM clients WHERE (clients.created_at BETWEEN '2008-12-21 00:00:00' AND '2008-12-22 00:00:00')