From f4cb6f120c99af701966e473dff3314e5415969a Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 5 May 2016 11:09:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8D=E7=89=87=E4=B8=AD=E7=9A=84=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=85=B3=E6=B3=A8=E5=92=8C=E6=B7=BB=E5=8A=A0=E5=85=B3?= =?UTF-8?q?=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_watch_btn_for_picture.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_watch_btn_for_picture.html.erb b/app/views/users/_watch_btn_for_picture.html.erb index be8673468..50f9b6240 100644 --- a/app/views/users/_watch_btn_for_picture.html.erb +++ b/app/views/users/_watch_btn_for_picture.html.erb @@ -2,8 +2,8 @@ <%= link_to("编辑资料", my_account_path, :class => "fl UsersEditBtn") %> <% else %> <%if(user.watched_by?(User.current))%> - <%= link_to "取消关注",Setting.host_name + "/watch?object_type=user&object_id="+user.id.to_s + "&target_id="+user.id.to_s,:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%> + <%= link_to "取消关注",watch_path(:host=> Setting.host_name,:object_type=> 'user',:object_id=>user.id.to_s,:target_id=>user.id.to_s),:class => "userFollow mr27 fl", :method => "delete",:remote => "true", :title => "取消关注"%> <% else %> - <%= link_to "添加关注",Setting.host_name + "/watch?object_type=user&object_id="+user.id.to_s + "&target_id="+user.id.to_s,:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%> + <%= link_to "添加关注",watch_path(:host=> Setting.host_name,:object_type=> 'user',:object_id=>user.id.to_s,:target_id=>user.id.to_s),:class => "userFollow mr27 fl", :method => "post",:remote => "true", :title => "添加关注"%> <% end %> <% end %> \ No newline at end of file