diff options
| author | mo khan <mo@mokhan.ca> | 2013-12-29 21:40:26 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-12-29 21:40:26 -0700 |
| commit | 6469e16e81519f3fa319dfc4e56143dbbfc0a9e7 (patch) | |
| tree | 50c3fe892f0dc2827a0a7ccd6c407a568013603a | |
| parent | e6f11180a63fe9f7dde36aee0193f73296143d81 (diff) | |
display all users in users admin page.
| -rw-r--r-- | app/controllers/admin/users_controller.rb | 1 | ||||
| -rw-r--r-- | app/views/admin/users/index.html.erb | 46 |
2 files changed, 47 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index f4f24d1e..89eaecd2 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,6 +1,7 @@ module Admin class UsersController < AdminController def index + @users = User.all end end end diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index e69de29b..ddc22fe2 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -0,0 +1,46 @@ +<div class="row"> + <div class="span12"> + <table class="table table-striped"> + <thead> + <tr> + <th>name</th> + <th>email</th> + <th>sign in count</th> + <th>current sign in</th> + <th>last_sign_in_at</th> + <th>created_at</th> + <th>website</th> + <th>twitter</th> + <th>facebook</th> + <th>city</th> + <th>latitude</th> + <th>longitude</th> + <th>authentication_token</th> + <th>full_address</th> + <th>creations_count</th> + </tr> + </thead> + <tbody> + <%- @users.each do |user| %> + <tr> + <td><%= user.name %></td> + <td><%= user.email %></td> + <td><%= user.sign_in_count %></td> + <td><%= user.current_sign_in_at %></td> + <td><%= user.last_sign_in_at %></td> + <td><%= user.created_at %></td> + <td><%= user.website %></td> + <td><%= user.twitter %></td> + <td><%= user.facebook %></td> + <td><%= user.city %></td> + <td><%= user.latitude %></td> + <td><%= user.longitude %></td> + <td><%= user.authentication_token %></td> + <td><%= user.full_address %></td> + <td><%= user.creations_count %></td> + </tr> + <% end %> + </tbody> + </table> + </div> +</div> |
