1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-15 00:24:09 +01:00
fab-manager/app/views/api/age_ranges/index.json.jbuilder

7 lines
175 B
Plaintext
Raw Normal View History

user_is_admin = (current_user and current_user.admin?)
2016-06-30 09:34:26 +02:00
2016-06-29 11:21:21 +02:00
json.array!(@age_ranges) do |ar|
json.extract! ar, :id, :name
2016-06-30 09:34:26 +02:00
json.related_to ar.events.count if user_is_admin
2016-06-29 11:21:21 +02:00
end