Actions
Refactor #6878
openReplace default_scope with specific scopes for visibility
Status:
New
Priority:
Normal
Assignee:
-
Category:
Rails
Target version:
-
Description
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?
Updated by Dominic Cleal over 10 years ago
- Related to Bug #6873: Error during db:seed from 1.4 to 1.6: undefined method `expire_topbar_cache' for nil:NilClass added
Updated by The Foreman Bot over 10 years ago
- Status changed from New to Ready For Testing
- Target version set to 1.7.5
- Pull request https://github.com/theforeman/foreman/pull/1665 added
- Pull request deleted (
)
Updated by Dominic Cleal over 10 years ago
- Blocks Bug #6964: Error on startup: "null value in column "user_id" violates not-null constraint" added
Updated by Dominic Cleal over 10 years ago
- Assignee set to Dominic Cleal
- Translation missing: en.field_release set to 10
Updated by Dominic Cleal over 10 years ago
- Status changed from Ready For Testing to New
- Assignee deleted (
Dominic Cleal) - Target version deleted (
1.7.5) - Translation missing: en.field_release deleted (
10) - Pull request added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/1665)
Didn't mean to use this bug only for users.
Updated by Dominic Cleal over 10 years ago
- Blocks deleted (Bug #6964: Error on startup: "null value in column "user_id" violates not-null constraint")
Updated by Dominic Cleal over 10 years ago
- Related to Bug #6964: Error on startup: "null value in column "user_id" violates not-null constraint" added
Actions