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/categories/index.json.jbuilder
2022-12-21 14:05:14 +01:00

7 lines
175 B
Ruby

# frozen_string_literal: true
json.array!(@categories) do |category|
json.extract! category, :id, :name
json.related_to category.events.count if current_user&.admin?
end