Not losing paperclip attachment when model cannot be saved due to validation error
The scenario is a normal model that contains a paperclip attachment along with some other columns that have various validations. When a form to to create an object cannot be saved due to a validation error unrelated to the attachment, columns like strings are preserved and remain prefilled for the user, but a file selected for uploading is completely lost and must be reselected by the user. Is there a standard approach to preserving the attachment in the case of a model validation error? This seems like a very common use case. It seems inelegant to hack up a solution where the file is saved