Removing attachment after commit transaction
|Assignee:||Jean-Philippe Lang||% Done:|
Now in Attachment model is
If you want to construct a serious logic with Rollback this behaviour leads to remove file from disk, but leave an attachment record in DB.
In my project I replaced this callback on
after_commit :delete_from_disk, on: :destroy
and it works perfect.
I think this is a good modification for Redmine. It have full backward compatibility but can extend ability for strong logic in app.