2021-12-21 09:51:40 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-11-08 16:20:34 +01:00
|
|
|
json.partial! 'api/spaces/space', space: @space
|
2023-07-28 16:16:44 +02:00
|
|
|
json.extract! @space, :characteristics, :machine_ids, :child_ids, :created_at, :updated_at
|
2017-02-13 16:10:12 +01:00
|
|
|
json.space_files_attributes @space.space_files do |f|
|
|
|
|
json.id f.id
|
2022-11-08 16:20:34 +01:00
|
|
|
json.attachment_name f.attachment_identifier
|
2017-02-13 16:10:12 +01:00
|
|
|
json.attachment_url f.attachment_url
|
2017-02-14 12:41:51 +01:00
|
|
|
end
|
2023-07-28 16:16:44 +02:00
|
|
|
|
|
|
|
if @space.parent
|
|
|
|
json.parent do
|
|
|
|
json.name @space.parent.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
json.children @space.children do |child|
|
|
|
|
json.name child.name
|
|
|
|
end
|