forked from Gitlink/forgeplus
新增:用户类型字段返回
This commit is contained in:
parent
ce0f70c836
commit
6c2b897aff
|
@ -3,6 +3,7 @@ user = target.user
|
|||
json.format_time target.created_at.strftime("%Y-%m-%d")
|
||||
json.name user.try(:show_real_name)
|
||||
json.login user.try(:login)
|
||||
json.type user.try(:user_type).blank? ? "" : ["事业单位", "企业单位", "科研人员", "高校教师", "高校学生", "程序员", "其他"][user.try(:user_type).to_i]
|
||||
json.image_url url_to_avatar(user)
|
||||
json.is_current_user current_user.try(:id) == target.user_id
|
||||
json.is_watch current_user&.watched?(user)
|
||||
|
|
Loading…
Reference in New Issue