]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
Refactor friendships controller and model
[rails.git] / app / views / users / show.html.erb
index efeac90bc23f6b4cc2dc834a9e6945f1180757a8..5a8c116c17f733ea77f0d737c79e782c11ac40be 100644 (file)
@@ -84,9 +84,9 @@
             <% if current_user %>
               <li>
                 <% if current_user.friends_with?(@user) %>
             <% if current_user %>
               <li>
                 <% if current_user.friends_with?(@user) %>
-                  <%= link_to t(".unfollow"), remove_friend_path(:display_name => @user.display_name), :method => :post %>
+                  <%= link_to t(".unfollow"), follow_path(:display_name => @user.display_name), :method => :delete %>
                 <% else %>
                 <% else %>
-                  <%= link_to t(".follow"), make_friend_path(:display_name => @user.display_name), :method => :post %>
+                  <%= link_to t(".follow"), follow_path(:display_name => @user.display_name), :method => :post %>
                 <% end %>
               </li>
             <% end %>
                 <% end %>
               </li>
             <% end %>