毕设选题报错

dev_forum
daiao 6 years ago
parent 0b1049e319
commit 0e32e63b7b

@ -24,8 +24,7 @@ class GraduationTopicsController < ApplicationController
end
# 当前用户是否已经选过题
user_graduation_topics = @course.student_graduation_topics.where(user_id: current_user.id, status: [0, 1]) #6.12 -hs
@user_selected = user_graduation_topics.size > 0
@user_selected = @course.student_graduation_topics.where(user_id: current_user.id, status: [0, 1]).count > 0 #6.12 -hs
## 分页参数
page = params[:page] || 1
limit = params[:limit] || 15

Loading…
Cancel
Save