parent
70665d6b8a
commit
7e2acf2ffd
@ -1,9 +1,5 @@
|
||||
json.subjects @subjects do |subject|
|
||||
json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count)
|
||||
json.myshixuns_count subject.myshixuns_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?
|
||||
json.subjects do
|
||||
json.partial! 'subject', locals: {subjects: @subjects}
|
||||
end
|
||||
|
||||
json.total_count @subject_count
|
||||
json.total_count @total_count
|
||||
|
Loading…
Reference in new issue