实践课程列表参数不变

mast_item_banktwo
daiao 5 years ago
parent 70665d6b8a
commit 7e2acf2ffd

@ -1,9 +1,5 @@
json.subjects @subjects do |subject| json.subjects do
json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) json.partial! 'subject', locals: {subjects: @subjects}
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?
end end
json.total_count @subject_count json.total_count @total_count

Loading…
Cancel
Save