I\'m trying to search a model for any dates equal to a specific date while omitting the timestamp. In Rails I could simply execute this as DateTime.to_date == somedate
DateTime.to_date == somedate
With scope:
scope :on_day, (lambda do |day| where(date: day.beginning_of_day..day.end_of_day) end)
Using:
Foo.on_day(Date.today).count