13 lines
392 B
Ruby
13 lines
392 B
Ruby
# 单表存储的信息可以放里面
|
|
json.array! users do |user|
|
|
json.username user.full_name
|
|
json.login user.login
|
|
json.user_id user.id
|
|
json.mail user.mail
|
|
json.phone user.phone.present? ? "#{user.phone[0..2]}****#{user.phone[-4..-1]}" : ""
|
|
json.custom_department user.custom_department
|
|
json.image_url url_to_avatar(user)
|
|
json.profile_completed user.profile_completed
|
|
end
|
|
|