@ -1,6 +1,7 @@
json.subjects @subjects do |subject|
json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count)
json.myshixuns_count subject.member_count
json.challenges_count subject.subject_challenge_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,6 +2,7 @@ json.subject do
json.name @subject.name
json.description @subject.description
json.shixuns_count @subject.shixuns_count
json.challenges_count @subject.subject_challenge_count
json.member_count @subject.member_count
json.subject_score @subject.all_score
json.learning_notes @subject.learning_notes