From 63af60d7b676ae28ce16254bc880246e10d8d5fa Mon Sep 17 00:00:00 2001 From: yanxd Date: Sat, 17 May 2014 10:44:01 +0800 Subject: [PATCH] =?UTF-8?q?edit=20=E5=9B=BE=E6=A0=87=E4=B8=A2=E5=A4=B1=20b?= =?UTF-8?q?id=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 4 ++-- public/images/edit.png | Bin 0 -> 522 bytes 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 public/images/edit.png diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 1ae04fa08..2273de4e4 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -732,9 +732,9 @@ class BidsController < ApplicationController def update @bid = Bid.find(params[:id]) @project = @bid.courses.first#Project.find(params[:course_id]) - if @bid.update_attributes(params[:bid]) + @bid.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads])) + if @bid.update_attributes(params[:bid]) && @bid.save flash[:notice] = l(:label_update_homework_succeed) - #@project = Project.find(params[:course_id]) redirect_to project_homework_path(@project) else @bid.safe_attributes = params[:bid] diff --git a/public/images/edit.png b/public/images/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..8335716fd5f9994eca802b8b14fb43c667bcc034 GIT binary patch literal 522 zcmV+l0`>igP)Pft(g&!0d4|DQhl|Nrg@{~ubrZp3Q+~ymoxxm8*H4N^pv1Yip)*8iT zxaN1O|Nnnp_5bP)+t({+c&Ek2#xlS#b^{t;j635SH*4VjT z*<#CZXO|5F$dCp79t`2(;b06m;ObIawo8j`bN;_O^Zx&%B%tP+|GVZnojSDGvFh|1 zI|h&eGrK(D8Zitwy}-`$|HbSB|394j|NrT#ubU=2AKo#?$-T4Mhhb8qH-<(G1NP2z zY6WXP6?Ab`x9hCl3ZDR=0#P6q#-$m>03hf8sxH@A9c8}B$+01(K)x;zYXPwd5c2~u zFA#G9F$WN{0Wk{@GZRe8Kt+l`EDOYvKr8~p0zk|SGl-(B3^afV01ba!p4w(>hyVZp M07*qoM6N<$f^G@~i~s-t literal 0 HcmV?d00001