json.partial! "commons/success" json.data do json.id @category_id json.name @category_name json.total_count @total_count json.public_count @public_count json.private_count @private_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