1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/views/api/admins/_admin.json.jbuilder
2016-03-23 18:39:41 +01:00

14 lines
500 B
Ruby

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
json.gender admin.profile.gender
json.birthday admin.profile.birthday if admin.profile.birthday
json.phone admin.profile.phone
json.user_avatar do
json.id admin.profile.user_avatar.id
json.attachment_url admin.profile.user_avatar.attachment_url
end if admin.profile.user_avatar
end