1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/views/open_api/v1/users/_user.json.jbuilder

16 lines
335 B
Plaintext
Raw Normal View History

2022-12-06 16:08:38 +01:00
# frozen_string_literal: true
2016-05-04 18:17:50 +02:00
2022-12-06 16:08:38 +01:00
json.extract! user, :id, :email, :created_at, :external_id
json.full_name user.profile.full_name if user.association(:profile).loaded?
2016-05-04 18:17:50 +02:00
if user.association(:group).loaded?
json.group do
if user.group_id?
json.extract! user.group, :id, :name, :slug
else
json.nil!
end
end
end