From 87d3e6190c6e9ee94ec2402321708a840e378ef8 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 29 Sep 2016 16:33:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BD=9C=E4=B8=9A=E7=BC=93?= =?UTF-8?q?=E5=AD=98BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 63b14fc53..67750d044 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1067,7 +1067,7 @@ class StudentWorkController < ApplicationController def student_work_project @work = @homework.student_works.where("user_id = #{User.current.id} and work_status = 0").first if @work - @work.attribute('project_id', params[:projectName].to_i) + @work.update_attribute('project_id', params[:projectName].to_i) end @project = StudentWorkProject.new @project.homework_common_id = @homework.id