diff options
author | Tomer Kimia <tkimia@purdue.edu> | 2014-03-03 19:51:30 -0500 |
---|---|---|
committer | Tomer Kimia <tkimia@purdue.edu> | 2014-03-03 19:51:30 -0500 |
commit | b8c14b654255376d79fae55e139a968930be4569 (patch) | |
tree | 9197a97b1392801ec138327b00e9bd31c050ab77 | |
parent | 254f8b72b2d92787d2e1f9e7589935b2c0dae66d (diff) |
fixed users table
-rw-r--r-- | app/controllers/users_controller.rb | 6 | ||||
-rw-r--r-- | app/views/users/index.html.erb | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 6436e4e..c14f67c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -15,9 +15,13 @@ class UsersController < ApplicationController end def show - @user = User.find(param[:id]) + @user = User.find(params[:id]) end + def index + @users = User.all + end + private def user_params diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8b9056b..10f19f4 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,6 +1,6 @@ <h1>Listing users</h1> -<table> +<table class="table table-hover"> <thead> <tr> <th>Name</th> @@ -15,7 +15,7 @@ <% @users.each do |user| %> <tr> <td><%= user.name %></td> - <td><%= user.pw_hash %></td> + <td> ******* </td> <td><%= link_to 'Show', user %></td> <td><%= link_to 'Edit', edit_user_path(user) %></td> <td><%= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' } %></td> |