1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-03 14:24:23 +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