小程序的课程列表统一取学习人数

Adjustreact
cxt 5 years ago
parent 71867e1961
commit ec29599171

@ -1,6 +1,6 @@
json.subjects @subjects do |subject| json.subjects @subjects do |subject|
json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count)
json.myshixuns_count subject.excellent ? subject.member_count : subject.myshixuns_count json.myshixuns_count subject.member_count
json.challenges_count subject.subject_challenge_count json.challenges_count subject.subject_challenge_count
json.image_url url_to_avatar(subject) json.image_url url_to_avatar(subject)
json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin? json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin?

Loading…
Cancel
Save