1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/views/api/members/list.json.jbuilder
2016-05-30 15:39:19 +02:00

15 lines
427 B
Ruby

json.array!(@members) do |member|
json.id member.id
json.email member.email if current_user
json.profile do
json.first_name member.profile.first_name
json.last_name member.profile.last_name
json.phone member.profile.phone
end
json.group do
json.name member.group.name
end
json.subscribed_plan do
json.partial! 'api/shared/plan', plan: member.subscribed_plan
end if member.subscribed_plan
end