How to select values ​​from a database for a time interval, in the base there are two columns - date and float value (ratio of one currency to another)

    1 answer 1

    You can pass Range to where

    User.where({ created_at: (Time.now.midnight - 1.day)..Time.now.midnight })