json.partial! "commons/success" json.data do json.id @category_id json.name @category_name json.total_count @total_count json.publish_count @publish_count json.unpublish_count @unpublish_count json.course_is_public @course.is_public? json.files do json.array! @attachments do |attachment| json.partial! "attachments/attachment", attachment: attachment json.author do json.partial! "users/user_simple", user: attachment.author end json.partial! "files/course_groups", attachment_group_settings: attachment.attachment_group_settings end end end