Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added users/show.html.erb, per grempe's suggestion

  • Loading branch information...
commit ec8d7e75452e8701d83667aa1e5895b42fcca5c4 1 parent 64db526
Jerry Richardson authored
View
2  app/controllers/users_controller.rb
@@ -1,7 +1,7 @@
class UsersController < ApplicationController
include Clearance::App::Controllers::UsersController
- before_filter :admin_only, :only => [ :index ]
+ before_filter :admin_only, :only => [ :index, :show ]
before_filter :get_user, :only => [ :edit, :update ]
def index
View
8 app/views/users/show.html.erb
@@ -0,0 +1,8 @@
+<h1><%= mail_to @user.email if signed_in? %></h1>
+
+<% if show_admin_content? %>
+ <div id="control_block">
+ <%= link_to "Edit", edit_user_path(@user) %>
+ <%= link_to "Users", users_path %>
+ </div>
+<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.