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/price_categories/index.json.jbuilder
2016-08-25 15:36:52 +02:00

7 lines
225 B
Ruby

user_is_admin = (current_user and current_user.is_admin?)
json.array!(@price_categories) do |category|
json.extract! category, :id, :name, :conditions
json.events category.event_price_category.count if user_is_admin
end