mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-02 13:24:20 +01:00
16 lines
296 B
Plaintext
16 lines
296 B
Plaintext
|
json.extract! user, :id, :email, :created_at
|
||
|
|
||
|
if user.association(:profile).loaded?
|
||
|
json.full_name user.profile.full_name
|
||
|
end
|
||
|
|
||
|
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
|