From 80afefcd28f58b592e63f6ed7becf870676e32f6 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 4 Jun 2014 10:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=AF=E5=AF=B9=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=BF=9B=E8=A1=8C=E5=A2=9E=E3=80=81=E5=88=A0=E7=AD=89?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_attach_controller.rb | 4 +++- app/views/bids/_homework_list.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index b2d07aeea..24e1a86e4 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -70,7 +70,9 @@ class HomeworkAttachController < ApplicationController description = params[:homework_description] @homework.name = name @homework.description = description - #@homework.save_attachments(params[:attachments]) + if params[:attachments] + @homework.save_attachments(params[:attachments]) + end if @homework.save respond_to do |format| format.html { redirect_to project_for_bid_path @homework.bid } diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index b4bae3fbe..c8ed051e5 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -102,12 +102,12 @@