From 70c47a3c9beb8beaa245fcea5fbcbb117f5943fe Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 13 Apr 2019 10:56:20 +0800 Subject: [PATCH] 1 --- app/controllers/graduation_topics_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/graduation_topics_controller.rb b/app/controllers/graduation_topics_controller.rb index 32823ab9..d55638df 100644 --- a/app/controllers/graduation_topics_controller.rb +++ b/app/controllers/graduation_topics_controller.rb @@ -106,7 +106,7 @@ class GraduationTopicsController < ApplicationController def student_select_topic if User.current.student_graduation_topics.where(:course_id => @course.id, :status => [0, 1]).count == 0 @topic.student_graduation_topics << StudentGraduationTopic.new(:course_id => @course.id, :user_id => User.current.id, - :member_id => @course.members.where(:user_id => User.current.id).first.try(:id)) + :member_id => @course.course_members.where(:user_id => current_user.id).first.try(:id)) @topic.update_attributes(:status => 1) end redirect_to graduation_topic_path(@topic)