1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/views/api/trainings/index.json.jbuilder

8 lines
313 B
Ruby

# frozen_string_literal: true
json.array!(@trainings) do |training|
json.partial! 'api/trainings/training', training: training
json.plan_ids training.plan_ids if current_user&.admin?
json.override_settings training.override_settings? if attribute_requested?(@requested_attributes, 'override_settings')
end