I’m playing with the file_column plugin and I would like to rename the
file when uploading it and before saving it to DB. I’ve tried it with
before_create method in my model and also in the controller with the
following code:
This also doesn’t worked. I’m getting the same as with my ‘solution’:
Do not know how to handle a string with value ‘newname’ that was passed
to a file_column. Check if the form’s encoding has been set to
‘multipart/form-data’.