mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-11 22:24:21 +01:00
7 lines
258 B
Plaintext
7 lines
258 B
Plaintext
|
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
|