Проверете ръководствата за Rails при условия на диапазон:
Client.where(created_at: (Time.now.midnight - 1.day)..Time.now.midnight)
Това ще създаде следния SQL:
SELECT * FROM clients WHERE (clients.created_at BETWEEN '2008-12-21 00:00:00' AND '2008-12-22 00:00:00')