-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
Description
DateTimeRangeInput inherits from ActiveAdmin's DateRangeInput. So it uses lteq_datetime predicate. But definition of this predicate is correct if we use date part of the datetime/timestamp value rather than whole value
https://github.com/activeadmin/activeadmin/blob/v2.3.1/lib/ransack_ext.rb#L17
So now if end range field of the date_time_range filter is non-empty we always get incorrect request to DB.
For the whole value when lteq predicate is being converted to lt predicate then microseconds have to be increased by 1 (at least for Postgresql that stores timestamps with microsecond resolution) instead of days.
workgena