Do not take time of day into account when searching dates

This commit is contained in:
Frederic Merizen 2018-10-26 15:10:42 +02:00
parent 16a018d137
commit f6207bee26
2 changed files with 9 additions and 1 deletions

View file

@ -111,7 +111,7 @@ class ProcedurePresentation < ApplicationRecord
column = sanitized_column(filter)
case table
when 'self'
date = Time.zone.parse(filter['value']) rescue nil
date = Time.zone.parse(filter['value']).beginning_of_day rescue nil
if date.present?
dossiers.where("#{column} BETWEEN ? AND ?", date, date + 1.day)
else