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
Try this:
User.where(last_deposit.gt(10.days.ago))