Instead of using a placeholder for the time range:
User.where("created_at < ?", Time.zone.now)
You can use the Ruby range:
User.where(created_at: ...Time.zone.now)
If you are looking for lesser or equal to, you can just use ..
instead:
User.where(created_at: ..Time.zone.now)
But keep in mind that the Ruby range does not support exclusive start:
User.where(created_at: Time.zone.now...)
# This will still be created_at >= instead of >