I have a model that needs to rename a file when being created. In order to keep my controller skinny, this is done in the after_validation method of my model. I don’t want this argument stored in the DB, I just need to access it in the after_validation model.
The problem is that when from my controller I call Model.create(:my_temp_arg => "blahh") I get the Can't mass-assign protected attributes error.
How can I do this?
Thanks!
You need to add it to
attr_accessiblelist and attr_accessor: