method

include?

rails latest stable - Class: ActiveSupport::IncludeTimeWithZone

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.1.7.7) is shown here.

include?(value)
public

Extends the default Range#include? to support ActiveSupport::TimeWithZone.

(1.hour.ago..1.hour.from_now).include?(Time.current) # => true