.joins(:residence) .where('(custom_services.date_from - ?) <= 1', Date.today)
Does anyone know how to correctly implement a check the difference between the date in custom_services.date_from and today’s is less than or equal to one day(in the screenshot, one of the attempts is not correct)
>Solution :
you can just use
.where('custom_services.date_from <= ?', Date.today + 1.day)