vendredi 10 juillet 2020

Scope with days period works from the last deploy date

I have a scope on a booking model, that takes bookings into the current period of 15 days. it works, so, in production, after one day i seen that not works, on the log applies the scope filter from the moment deployment was done.

First, scope looked as this:

scope :current_availables, where(date: Date.today..Date.today+14.days )

And now the scope looks like this

scope :current_availables, where(date: Date.current.beginning_of_day..Date.current+14.days )

What is happening?

Aucun commentaire:

Enregistrer un commentaire