1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00
fab-manager/app/views/api/machines/_machine.json.jbuilder
2022-12-20 18:45:53 +01:00

12 lines
343 B
Ruby

# frozen_string_literal: true
json.extract! machine, :id, :name, :slug, :disabled, :machine_category_id
if machine.machine_image
json.machine_image_attributes do
json.id machine.machine_image.id
json.attachment_name machine.machine_image.attachment_identifier
json.attachment_url machine.machine_image.attachment.url
end
end