You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/shixuns/collaborators.json.jbuilder

21 lines
624 B

6 years ago
# [
# {
# user: User,
# follow: true, //是否已经关注
# }
# ]
json.array! @members do |member|
json.user do
json.partial! 'users/user', locals: { user: member.user }
json.user_shixuns_count member.user.shixuns.published.count
#json.fans_count member.user.followers.count
json.brief_introduction member.user.user_extension.brief_introduction
json.identity member.user.identity
json.school_name member.user.school_name
json.shixun_manager member.role == 1
json.user_id member.user_id
end
json.follow follow?(member.user.id, @user.id)
end