2016-03-23 18:39:41 +01:00
|
|
|
json.extract! admin, :id, :username, :email, :group_id, :slug
|
|
|
|
json.profile_attributes do
|
|
|
|
json.id admin.profile.id
|
|
|
|
json.first_name admin.profile.first_name
|
|
|
|
json.last_name admin.profile.last_name
|
2019-06-04 13:33:00 +02:00
|
|
|
json.gender admin.statistic_profile.gender
|
|
|
|
json.birthday admin.statistic_profile.birthday if admin.statistic_profile.birthday
|
2016-03-23 18:39:41 +01:00
|
|
|
json.phone admin.profile.phone
|
2019-05-29 14:28:14 +02:00
|
|
|
if admin.profile.user_avatar
|
|
|
|
json.user_avatar do
|
|
|
|
json.id admin.profile.user_avatar.id
|
|
|
|
json.attachment_url admin.profile.user_avatar.attachment_url
|
|
|
|
end
|
|
|
|
end
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|