Bekijk de Rails-gidsen op bereikvoorwaarden:
Client.where(created_at: (Time.now.midnight - 1.day)..Time.now.midnight)
Dat levert de volgende SQL op:
SELECT * FROM clients WHERE (clients.created_at BETWEEN '2008-12-21 00:00:00' AND '2008-12-22 00:00:00')