Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Overriding" self.valid_roles #42

Open
ArminBeda opened this issue Nov 3, 2023 · 1 comment
Open

"Overriding" self.valid_roles #42

ArminBeda opened this issue Nov 3, 2023 · 1 comment
Labels

Comments

@ArminBeda
Copy link

If I have something like the following structure:

class User < ApplicationRecord
      include RoleModel
      
      roles ...
      
      DELETED_ROLES = [...]

I have to keep the original list of roles, even if I remove one. Can I somehow "ovveride" the self.valid_roles, so that it is something like roles self.valid_roles - DELETED_ROLES array inside the User class?

@martinrehfeld
Copy link
Owner

martinrehfeld commented Nov 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants