You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have large number of controllers/module and I need one policy (applicationPolicy) to handle their common actions. Do I need to create a policy class for each controller (record)?
The text was updated successfully, but these errors were encountered:
...But in general, I would recommend creating blank policies for each model.
This makes it clear to other developers that there is no special behaviour (without having to unpick how you've over-ridden the policy class). It also makes the code easy/obvious how to change in future, when special rules do need to apply for a model.
In addition, note that blank policy classes will be auto-generated when you create a new model via rails generate.
I have large number of controllers/module and I need one policy (applicationPolicy) to handle their common actions. Do I need to create a policy class for each controller (record)?
The text was updated successfully, but these errors were encountered: