json.extract! @module, :id, :name, :position, :url md = @module.competition_module_md_contents.take if md.present? json.md_id md.id json.md_name md.name json.md_content md.content json.competition_stage_id md.competition_stage_id json.created_at md.created_at.strftime('%Y-%m-%d %H:%M:%S') json.attachments do json.array! md.attachments, partial: 'attachments/attachment_simple', as: :attachment end end