From badddfc63271259fd73aaeb72520c85ee3be6f9d Mon Sep 17 00:00:00 2001 From: Kirill Shirinkin Date: Wed, 17 Nov 2021 10:32:14 +0100 Subject: [PATCH] Fix updating attachments in Rails 6 See https://github.com/comfy/comfortable-mexican-sofa/pull/892 --- app/models/comfy/cms/file.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/comfy/cms/file.rb b/app/models/comfy/cms/file.rb index 19b05ce45..69ffbf5bc 100644 --- a/app/models/comfy/cms/file.rb +++ b/app/models/comfy/cms/file.rb @@ -56,7 +56,7 @@ def assign_label def process_attachment return if @file.blank? - attachment.attach(@file) + self.attachment = @file end end