Consulta le guide ferroviarie in condizioni di intervallo:
Client.where(created_at: (Time.now.midnight - 1.day)..Time.now.midnight)
Ciò produrrà il seguente SQL:
SELECT * FROM clients WHERE (clients.created_at BETWEEN '2008-12-21 00:00:00' AND '2008-12-22 00:00:00')