From c272d7a8c70f9449ae7a4542badfc0ca5aeda4d0 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Wed, 23 Apr 2014 16:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BA=94=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BD=BF=E5=85=B6?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=9B=B4=E6=96=B0=E9=87=8D=E6=96=B0=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E6=96=87=E4=BB=B6=EF=BC=8C=E4=BD=86=E6=98=AF?= =?UTF-8?q?=E4=BC=9A=E5=88=A0=E9=99=A4=E4=B8=8A=E6=AC=A1=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/softapplications_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index 5153a01d4..9cc940bdd 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -76,7 +76,8 @@ class SoftapplicationsController < ApplicationController # PUT /softapplications/1.json def update # @softapplication = Softapplication.find(params[:id]) - + @softapplication.attachments.map{|attach| attach.destroy } + @softapplication.save_attachments(params[:attachments]) respond_to do |format| if @softapplication.update_attributes(params[:softapplication]) format.html { redirect_to @softapplication, notice: 'Softapplication was successfully updated.' }