You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing dates, the time value needs to be modified to include any DateTimes spanning the 24 hour covered by that date value. Set date to end_of_day for lteq comparisons, and to beginning_of_day for gteq values:
# Override ActionSet filter_instructions_for method to modify filtering behavior.
def filter_instructions_for(set)
filter_params_hash = super
# Modify dates passed to lteq and gteq matchers so that their time portion is set correctly
filter_params_hash.select { |_, v| v.instance_of?(ActiveSupport::TimeWithZone) }.each do |k, v|
filter_params_hash[k] = v.end_of_day if k.first.include? 'lteq'
filter_params_hash[k] = v.beginning_of_day if k.first.include? 'gteq'
end
filter_params_hash
end
The text was updated successfully, but these errors were encountered:
When comparing dates, the time value needs to be modified to include any DateTimes spanning the 24 hour covered by that date value. Set date to
end_of_day
forlteq
comparisons, and tobeginning_of_day
forgteq
values:The text was updated successfully, but these errors were encountered: