1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-02 13:24:20 +01:00
fab-manager/app/views/open_api/v1/events/index.json.jbuilder

18 lines
460 B
Plaintext
Raw Normal View History

2016-05-04 18:17:50 +02:00
json.events @events do |event|
json.partial! 'open_api/v1/events/event', event: event
json.extract! event, :nb_total_places, :nb_free_places
json.prices do
json.normal do
json.name I18n.t('app.public.home.full_price')
json.amount event.amount
end
event.event_price_categories.each do |epc|
pc = epc.price_category
json.set! pc.id do
json.name pc.name
json.amount epc.amount
end
end
end
2016-05-04 18:17:50 +02:00
end