activerecord check date between

Developer from somewhere

Was writing a raw query, when I remembered about range support:

User.where(created_at: Time.zone.now-2.hours..Time.zone.now)