Skip to content

[948, 952] Fix Suite.available scope

Oren Kanner requested to merge 948-unavailable-suites into master

Resolves #948 (closed), resolves #952 (closed)

  • Previously, the left outer joins being used to find available suites meant that any suite that had an archived group assigned to it would be returned, even if it was also assigned to an active group. Rather than deal with an incredibly complex single query, we have chosen to leverage the fact that the inverse query (unavailable suites) is much easier to compose with ActiveRecord and then simply define the available scope as all suites that are not unavailable. This will likely incur some performance cost but at this time it seems like that is worth the increase in reliability and maintainability.
  • Also add Suite.unavailable scope

Closes #948 (closed)

Edited by Oren Kanner

Merge request reports