educoder/app/views/attachments/_attachment_simple.json.jbu...

6 lines
250 B

6 years ago
json.id attachment.id
json.title attachment.title
json.filesize number_to_human_size attachment.filesize
json.description attachment.description
json.url download_url(attachment)
json.set! :delete, delete.nil? ? true : delete if defined? delete