From f5405ec5344001626c148dd3a837fa4bf45a3b10 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Mon, 24 Jun 2019 15:12:11 +0800 Subject: [PATCH] fix --- app/views/users/_user_fans_or_watch.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_user_fans_or_watch.html.erb b/app/views/users/_user_fans_or_watch.html.erb index 898b3d2e..0044cb65 100644 --- a/app/views/users/_user_fans_or_watch.html.erb +++ b/app/views/users/_user_fans_or_watch.html.erb @@ -13,7 +13,7 @@ <% if user != User.current %>
- <% if(user.watched_by?(User.current)) %> + <% if Watcher.where(user_id: User.current.id, watchable_id: user.id, watchable_type: %w(Principal User)).exists? %> <%= link_to "取消关注", unwatch_path(:object_type => 'user', :object_id => user.id, :target_id => @user.id, :action_name => action), :class => "user_default_btn user_private_btn fl mr30 mt20",