1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-23 12:52:20 +01:00

7 lines
258 B
Plaintext
Raw Normal View History

2023-07-20 16:55:22 +02:00
user_is_admin = (current_user and current_user.admin?)
json.array!(@reservation_contexts) do |reservation_context|
json.extract! reservation_context, :id, :name, :applicable_on
json.related_to reservation_context.reservations.count if user_is_admin
end