Rails\' where method can take a range in a hash to generate a query that will search for a value that is within the range. For example:
where
You need to use the appropriate infinity. A timestamp is a DateTime not a Date. Use DateTime::Infinity.new instead or DateTime::Infinity.new(-1) for negative infinite.
DateTime
Date
DateTime::Infinity.new
DateTime::Infinity.new(-1)
Related: Is there a way to express 'Infinite Time' in Ruby?