You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/competitions/competition_modules/show.json.jbuilder

11 lines
355 B

json.extract! @module, :id, :name, :position, :url, :md_edit
md = @module.competition_module_md_content
if md.present?
json.md_name md.name
json.md_content md.content
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