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
Capacity represents something that can be reserved more than 1 time and reservation marks capacity as used. When a reservation is canceled (soft deleted) the counter cache does not decrement. Removing the -> { with_deleted } is a workaround.
When a capacity is destroyed, reservations are also destroyed and we need to inform the user on these deleted items. Currently adding a second belongs_to relationship for the with_deleted scope so delegations remain functional.
The text was updated successfully, but these errors were encountered:
Given this example
capacity.rb
reservation.rb
Capacity represents something that can be reserved more than 1 time and reservation marks capacity as used. When a reservation is canceled (soft deleted) the counter cache does not decrement. Removing the
-> { with_deleted }
is a workaround.Expectation
Actual Result
When a capacity is destroyed, reservations are also destroyed and we need to inform the user on these deleted items. Currently adding a second belongs_to relationship for the
with_deleted
scope so delegations remain functional.The text was updated successfully, but these errors were encountered: