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

allow to use action specific sanitization method with model name #801

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

camilova
Copy link

Its a common pattern to name strong parameters method with the model's name like patients_params
But it is also common splitting sanitization methods for :create and :update actions, and it can follow the same naming style too like :create_patients_params or update_patients_params as the other style create_params that currently is supported by CanCanCan.

It PR adds support to detect and use as the latest choice the named <action>_<model_name>_params method for sanitization.

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

Successfully merging this pull request may close these issues.

None yet

1 participant