1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-05 16:24:21 +01:00
fab-manager/app/views/api/shared/_plan.json.jbuilder

15 lines
437 B
Plaintext
Raw Normal View History

2016-03-23 18:39:41 +01:00
json.id plan.id
json.base_name plan.base_name
json.name plan.name
json.amount plan.amount ? (plan.amount / 100.0) : 0
json.interval plan.interval
json.interval_count plan.interval_count
json.training_credit_nb plan.training_credit_nb
json.training_credits plan.training_credits do |tc|
json.training_id tc.creditable_id
end
json.machine_credits plan.machine_credits do |mc|
json.machine_id mc.creditable_id
json.hours mc.hours
end