From 5ca94e4f9711568516c2d2044aef25a251239860 Mon Sep 17 00:00:00 2001 From: Jasder <2053003901@@qq.com> Date: Mon, 5 Oct 2020 17:41:28 +0800 Subject: [PATCH] FIX project about page for attachment bugh --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 363e90969..f861ce4db 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -123,7 +123,7 @@ class ProjectsController < ApplicationController if @project_detail.save! attachment_ids = Array(params[:attachment_ids]) logger.info "=============> #{Array(params[:attachment_ids])}" - @attachments = Attachment.where(id: attachment_ids).select(:id, :container_id, :container_type) + @attachments = Attachment.where(id: attachment_ids) @attachments.update_all( container_id: @project_detail.id, container_type: @project_detail.model_name.name,