Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
add user index page
Browse files Browse the repository at this point in the history
  • Loading branch information
edikle committed Jan 31, 2018
1 parent 9ea2a9e commit e2b0837
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
class UsersController < ApplicationController
end

def index
@users = User.all
end

end
12 changes: 12 additions & 0 deletions app/views/users/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<h1>User List</h1>

<table>
<tr>
<th>Name</th>
</tr>
<% @users.each do |user| %>
<tr>
<td><%= user.name %></td>
</tr>
<% end %>
</table>

0 comments on commit e2b0837

Please sign in to comment.