Files
gitlink-forgeplus/app/views/users/_watch_user_detail.json.jbuilder
sylor_huang@126.com c977b9350c 修改个人主页
2020-06-03 18:23:53 +08:00

9 lines
285 B
Ruby

user = target.watchable
json.format_time target.created_at.strftime("%Y-%m-%d")
json.name user.try(:show_real_name)
json.login user.try(:login)
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)