carrierwaveuploader / carrierwave

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
https://github.com/carrierwaveuploader/carrierwave
8.78k stars 1.65k forks source link

Fix dirty handling on update #2707

Closed rajyan closed 9 months ago

rajyan commented 9 months ago

fixes https://github.com/carrierwaveuploader/carrierwave/issues/2702

mark_remove_#{column}_false is called after commit https://github.com/rajyan/carrierwave/blob/e53c9c33674289ffabd8aa6ab3160e2ce60872dd/lib/carrierwave/mount.rb#L387-L389

which was the cause of this issue. Changed to write a temporary identifier only if remove is changed to a truthy value.

mshibuya commented 9 months ago

Great job, thank you always 👍