从题库选择毕设任务时,创建时间应为当前时间

dev_course
cxt 6 years ago
parent 8d0b3e4008
commit 8ab306550a

@ -240,7 +240,7 @@ class QuestionBanksController < ApplicationController
ActiveRecord::Base.transaction do
new_task = GraduationTask.new
new_task.attributes = task.attributes.dup.except("id", "course_id", "user_id", "quotes", "graduation_task_id",
"course_list_id", "gtask_bank_id")
"course_list_id", "gtask_bank_id", "created_at", "updated_at")
new_task.course_id = course.id
new_task.gtask_bank_id = task.id
new_task.user_id = current_user.id
@ -266,7 +266,7 @@ class QuestionBanksController < ApplicationController
ActiveRecord::Base.transaction do
new_topic = GraduationTopic.new
new_topic.attributes = topic.attributes.dup.except("id", "course_id", "user_id", "graduation_topic_id",
"course_list_id", "gtopic_bank_id")
"course_list_id", "gtopic_bank_id", "created_at", "updated_at")
new_topic.course_id = course.id
new_topic.gtopic_bank_id = topic.id
new_topic.user_id = current_user.id

Loading…
Cancel
Save