Replace default_scope with specific scopes for visibility
default_scopes have caused a few bugs, mostly around sorting as the field used for sorting may not be available when the model is used in another query. When used to restrict visibility (e.g. #3272 for hidden users and taxonomies generally), it can break Rails associations as they assume a model can be looked up by ID (#6873).
Perhaps we should move to a more generally available scopes on every model? .visible, .sorted etc?
#5 Updated by Dominic Cleal over 7 years ago
- Status changed from Ready For Testing to New
- Assignee deleted (
- Target version deleted (
- Legacy Backlogs Release (now unused) deleted (
- Pull request added
- Pull request deleted (
Didn't mean to use this bug only for users.