Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Hide settings tab when viewing another user's page

  • Loading branch information...
commit 378e29e5699a6c1ff0529151cfebc342569d24a8 1 parent f708434
@kkuchta authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/views/users/show.html.haml
View
5 app/views/users/show.html.haml
@@ -15,8 +15,9 @@
%a{:href => "#2", :data => {:toggle => "tab"}} +1'd
%li
%a{:href => "#3", :data => {:toggle => "tab"}} Commented
- %li
- = link_to "Settings", edit_user_path(@user)
+ - if can? :update, @user
+ %li
+ = link_to "Settings", edit_user_path(@user)
.tab-content{:style => "overflow: visible"}
#1.tab-pane.active
Please sign in to comment.
Something went wrong with that request. Please try again.