lundi 4 avril 2016

Compare the date only of a datetime to current date

My meetings model has a dateTime field called meeting_date. I'd like to use it in a .where(...) query in a way such as this:

<% @meetings = Meeting.where(meeting_date.to_date == Date.today.to_s %>

How can this be achieved?

Aucun commentaire:

Enregistrer un commentaire