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