I am trying to find records by \'created_at\' date - the database column type is \'datetime\' and I am using the UI DatePicker from jQuery
my url look like this: \"
I solved this problem by creating a method in model like below, Say, my model is ticket.rb
def created_date
self.created_at.to_date
end
then I queried like this,
selected_date = Date.parse(params[:date])
Ticket.all.map{|t| t if t.created_date == selected_date}.compact
This gives me accurate results that matches with the chosen date by the user.