修改可对文件进行增、删等操作

This commit is contained in:
sw 2014-06-04 10:12:07 +08:00
parent 29ac5ff12a
commit 80afefcd28
2 changed files with 5 additions and 3 deletions

View File

@ -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 }