diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index d52f72d3..5dbb4f2b 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -120,7 +120,7 @@ class AttachmentsController < ApplicationController end if @attachment.container # Make sure association callbacks are called - @attachment.container.def attachments.delete(@attachment) + @attachment.container.attachments.delete(@attachment) else @attachment.destroy end