This repository was archived by the owner on Jul 24, 2020. It is now read-only.
This repository was archived by the owner on Jul 24, 2020. It is now read-only.
Availability counts broken #1641
Closed
Description
Discovered today:
In the cart validations, we call count
on a list of reservations, expecting it to behave like Enumerable#count
, but the object is actually an ActiveRecordRelation
so the method behaves differently. (The block we pass isn't taken into account; we just get the size of the relation instead of the count we're expecting).
We need to convert the collection to an array before calling count; we should also make sure that this error isn't elsewhere in the code.
The issue is not occurring on deployed instances, fortunately.
Activity