search-model-for-today

Sometimes we want to search item for today. For example model is task,To to like it

Task.where(created_at: Time.now.midnight..Time.now.end_of_day)