Modified: trunk/app/helpers/application_helper.rb (2416 => 2417)
--- trunk/app/helpers/application_helper.rb 2010-05-27 09:36:14 UTC (rev 2416)
+++ trunk/app/helpers/application_helper.rb 2010-05-27 10:07:13 UTC (rev 2417)
@@ -963,7 +963,7 @@
def friend_badge(user)
if user and logged_in? and user.id != current_user.id
- return image_tag("friend_badge.png", :class => 'badge') if (user.friend? current_user.id)
+ return image_tag("friend_badge.png", :class => 'badge') if (current_user.friend? user.id)
else
return ''
end
Modified: trunk/app/views/users/_table.rhtml (2416 => 2417)
--- trunk/app/views/users/_table.rhtml 2010-05-27 09:36:14 UTC (rev 2416)
+++ trunk/app/views/users/_table.rhtml 2010-05-27 10:07:13 UTC (rev 2417)
@@ -12,7 +12,7 @@
<td class="mid" style="text-align: left;">
<p style="margin-top:0; padding-top:0; font-weight:bold; font-size: 108%;">
<%= if user.profile then flag_icon(user.profile.location_country, user.profile.location) end %>
- <%= name user.id %>
+ <%= name user %>
<%= friend_badge(user) %>
<%= admin_badge(user) %>
</p>
@@ -77,7 +77,7 @@
<%= icon "edit", edit_user_path(user), nil, nil, "Edit" %>
<% else %>
<!-- check if the profile that we are viewing now is a friend of current user -> stored for better performance -->
- <% this_user_is_friend_of_current_user = (current_user != 0) && user.friend?(current_user.id) %>
+ <% this_user_is_friend_of_current_user = (current_user != 0) && current_user.friend?(user.id) %>
<% unless !logged_in? || this_user_is_friend_of_current_user || current_user.friendship_pending?(user.id) %>
<%= icon "friendship", new_user_friendship_url(:user_id => user.id), nil, nil, "Request Friendship" %>
<% end %>