]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/dashboards/_contact.html.erb
Merge remote-tracking branch 'upstream/pull/5717'
[rails.git] / app / views / dashboards / _contact.html.erb
index 4547a2d7514f086a06fe95317d61caf92ebfbdc4..021f1a33585e7e5dac88e25bdfe894eb211c310b 100644 (file)
@@ -11,8 +11,8 @@
   <div class="col">
     <p class='text-body-secondary mb-0'>
       <%= link_to contact.display_name, contact %>
-      <% if @user.home_location? and contact.home_location? %>
-        <% distance = @user.distance(contact) %>
+      <% if current_user.home_location? and contact.home_location? %>
+        <% distance = current_user.distance(contact) %>
         <% if distance < 1 %>
           (<%= t ".m away", :count => (distance * 1000).round %>)
         <% else %>
@@ -35,7 +35,7 @@
       <ul class='clearfix text-body-secondary'>
         <li><%= link_to t("users.show.send message"), new_message_path(contact) %></li>
         <li>
-          <% if current_user.friends_with?(contact) %>
+          <% if current_user.follows?(contact) %>
             <%= link_to t("users.show.unfollow"), follow_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :delete %>
           <% else %>
             <%= link_to t("users.show.follow"), follow_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>