Allow List Params Anywhere With Strong Params
The intended use of StrongParams
is to prevent unintended params from getting through a controller action during mass assignment.
This can be put to use other places in your Rails app, such as a service object, where mass assignment is used to update records.
This helps prevent other values from getting inadvertently updated on the book
record.
The author_id
value is ignored and won't be passed to the #update
call.
Last updated