小程序列表数据问题

dev_video
daiao 5 years ago
parent 2fd2a116b0
commit 314f18a9be

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

@ -2,7 +2,7 @@ json.subject do
json.name @subject.name
json.description @subject.description
json.shixuns_count @subject.shixuns_count
json.member_count @subject.myshixuns_count
json.member_count @subject.member_count
json.subject_score @subject.all_score
json.learning_notes @subject.learning_notes
end

Loading…
Cancel
Save