diff --git a/app/controllers/concerns/commentable_actions.rb b/app/controllers/concerns/commentable_actions.rb index 44c98e760..4a1098a28 100644 --- a/app/controllers/concerns/commentable_actions.rb +++ b/app/controllers/concerns/commentable_actions.rb @@ -57,10 +57,7 @@ module CommentableActions end def update - resource.assign_attributes(strong_params) - recover_image_from_cache(resource) - - if resource.save + if resource.update(strong_params) redirect_to resource, notice: t("flash.actions.update.#{resource_name.underscore}") else load_categories @@ -112,10 +109,4 @@ module CommentableActions nil end - def recover_image_from_cache(resource) - return false unless resource.try(:image) - - resource.image.attachment = resource.image.set_attachment_from_cached_attachment if resource.image.cached_attachment.present? - end - end