Rails filter params before creating/updating -
I am trying to add user privileges to an existing app that was designed in the brain without user privilege . I.e.) If you are logged in, you can create, update, and delete objects.
The application is using Rail 4, so I can take advantage of strong parameters.
I need to add a new user level which can only edit the nested characteristics of a model, so I thought about filtering the parameters variable that the original model was updated before updating has gone.
How can I filter the You will need some type of authorization method, which can help with this, but I At least I would like to read this chapter of the Rail chapter. You can read the whole thing, it introduces to an excellent rail params variable before I update or create the model?
Comments
Post a Comment