I’m doing white list validations on the controller side so that
malformed data would not get to the database. However, this seems to be
tricky when updating an entity since I can’t find a way to seperate the
attribute updating from the saving itself.
What i’m looking for is a way to either run white_list on the parameters
in the params array (I don’t know if accessing a specific param is even
or running it on the entity itself before it is saved.
currently the code is as follows:
@post = Post.find(params[:id])
I cant seem to access the input received from the form independently
(like params[:body] if I had a body text field in the form), and since
update_attributes updates the attributes and also saves the data I’m