Index: acts_as_attachable.rb =================================================================== --- acts_as_attachable.rb (revision 19478) +++ acts_as_attachable.rb (working copy) @@ -125,9 +125,7 @@ def detach_saved_attachments saved_attachments.each do |attachment| - # TODO: use #reload instead, after upgrading to Rails 5 - # (after_rollback is called when running transactional tests in Rails 4) - attachment.container = nil + attachment.reload end end