You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
We need to make sure that there's a single source of date logic for reservations that lives in the Reservations model. #end_date and #overlaps_with? are two examples of methods that do this already, but I don't trust that they're used appropriately everywhere.
In the end, the only time the due_date attribute should be referenced outside of the reservation model is during reservation creation and when reservations are flagged as overdue (essentially, only situations that care about the actual due date, not just when the reservation is no longer actively holding an equipment item). Everywhere else should use an appropriate method on the reservation model.
The motivation behind this is to make #986 easier: in that issue, we need to add a processing date attribute to reservations.
The text was updated successfully, but these errors were encountered:
We need to make sure that there's a single source of date logic for reservations that lives in the Reservations model.
#end_date
and#overlaps_with?
are two examples of methods that do this already, but I don't trust that they're used appropriately everywhere.In the end, the only time the
due_date
attribute should be referenced outside of the reservation model is during reservation creation and when reservations are flagged as overdue (essentially, only situations that care about the actual due date, not just when the reservation is no longer actively holding an equipment item). Everywhere else should use an appropriate method on the reservation model.The motivation behind this is to make #986 easier: in that issue, we need to add a processing date attribute to reservations.
The text was updated successfully, but these errors were encountered: