I have a model with paperclip attachment. When I try to update the model with another image, everything works fine except if the new file has the same name that the old one.
I guess paperclip doesn’t understand that it’s a new file even if the filename is the same.
Do you have a idea to make it work ?
I was not able to find an elegant solution to this, but here is how I got it to work:
Have an attr_accessor boolean flag on your model, and when true call the Paperclip save method to force an update.
In my controller, when a post occurs with a file, I set that flag: