1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/views/api/custom_assets/show.json.jbuilder
2023-03-22 10:58:22 +01:00

17 lines
450 B
Ruby

# frozen_string_literal: true
json.custom_asset do
if @custom_asset
json.extract! @custom_asset, :id, :name
if @custom_asset.custom_asset_file
json.custom_asset_file_attributes do
json.id @custom_asset.custom_asset_file.id
json.attachment @custom_asset.custom_asset_file.attachment_identifier
json.attachment_url @custom_asset.custom_asset_file.attachment_url
end
end
else
json.nil!
end
end