From 75df5dc1b330b99b99d075502ac1d165bceded3f Mon Sep 17 00:00:00 2001 From: albert Date: Sat, 15 Oct 2011 23:10:48 -0400 Subject: [PATCH] fixes #133: Account edit settings while browsing other profiles --- app/views/users/_secondary_links.html.erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/users/_secondary_links.html.erb b/app/views/users/_secondary_links.html.erb index 3b6b9a100..d5cb4a8b0 100644 --- a/app/views/users/_secondary_links.html.erb +++ b/app/views/users/_secondary_links.html.erb @@ -1,12 +1,10 @@ <% content_for(:secondary_links) do %>
  • <%= link_to "Listing", users_path %>
  • - <% if @user && !@user.new_record? %> + <% unless CurrentUser.is_anonymous? %>
  • |
  • -
  • <%= link_to "Settings", edit_user_path(@user) %>
  • -
  • <%= link_to "Profile", user_path(@user) %>
  • - <% end %> - <% unless CurrentUser.user.is_anonymous? %> +
  • <%= link_to "Settings", edit_user_path(CurrentUser.user) %>
  • +
  • <%= link_to "Profile", user_path(CurrentUser.user) %>
  • |
  • <%= link_to "Sign out", session_path, :method => :delete %>
  • <% end %>