mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-04 15:24:23 +01:00
19 lines
760 B
Ruby
19 lines
760 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.extract! training, :id, :name, :description, :machine_ids, :nb_total_places, :public_page, :disabled, :slug,
|
|
:auto_cancel, :auto_cancel_threshold, :auto_cancel_deadline, :authorization, :authorization_period, :invalidation,
|
|
:invalidation_period
|
|
if training.training_image
|
|
json.training_image_attributes do
|
|
json.id training.training_image.id
|
|
json.attachment_name training.training_image.attachment_identifier
|
|
json.attachment_url training.training_image.attachment.large.url
|
|
end
|
|
end
|
|
|
|
if training.advanced_accounting
|
|
json.advanced_accounting_attributes do
|
|
json.partial! 'api/advanced_accounting/advanced_accounting', advanced_accounting: training.advanced_accounting
|
|
end
|
|
end
|