diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-03 23:06:47 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-03 23:06:47 -0500 |
commit | 8b526eadfcb024a5e8ead4c5b63eacb554db0cf5 (patch) | |
tree | c96e10e0e0e48154430a4d733c6385433dbe2739 /app/views/users | |
parent | 3c9da1eee130d49f998016f8bad91f97f8bdf100 (diff) | |
parent | 423d0e5a440d8d66407522bc842ef273196173bc (diff) |
Merge branch 'clean4'
Conflicts:
app/assets/stylesheets/scaffolds.css.scss
app/assets/stylesheets/static.css.scss
app/controllers/sessions_controller.rb
app/controllers/static_controller.rb
app/controllers/tournaments_controller.rb
app/controllers/users_controller.rb
app/helpers/sessions_helper.rb
app/models/game.rb
app/models/user.rb
app/views/games/index.html.erb
app/views/tournaments/index.html.erb
app/views/tournaments/new.html.erb
app/views/users/_form.html.erb
app/views/users/index.html.erb
app/views/users/index.json.jbuilder
app/views/users/new.html.erb
app/views/users/show.html.erb
app/views/users/show.json.jbuilder
config/routes.rb
generate.sh
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/_form.html.erb | 10 | ||||
-rw-r--r-- | app/views/users/index.html.erb | 6 | ||||
-rw-r--r-- | app/views/users/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 20 |
4 files changed, 30 insertions, 8 deletions
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index 56d9f90..4d28738 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -13,11 +13,15 @@ <div class="field"> <%= f.label :name %><br> - <%= f.text_area :name %> + <%= f.text_field :name %> </div> <div class="field"> - <%= f.label :pw_hash %><br> - <%= f.text_area :pw_hash %> + <%= f.label :email %><br> + <%= f.text_field :email %> + </div> + <div class="field"> + <%= f.label :user_name %><br> + <%= f.text_field :user_name %> </div> <div class="actions"> <%= f.submit %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8b9056b..3692112 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -4,7 +4,8 @@ <thead> <tr> <th>Name</th> - <th>Pw hash</th> + <th>Email</th> + <th>User name</th> <th></th> <th></th> <th></th> @@ -15,7 +16,8 @@ <% @users.each do |user| %> <tr> <td><%= user.name %></td> - <td><%= user.pw_hash %></td> + <td><%= user.email %></td> + <td><%= user.user_name %></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> diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder index 182437e..42d8b72 100644 --- a/app/views/users/index.json.jbuilder +++ b/app/views/users/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@users) do |user| - json.extract! user, :id, :name, :pw_hash + json.extract! user, :id, :name, :email, :user_name json.url user_url(user, format: :json) end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 43c12fe..9455a3c 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,3 +1,19 @@ -app/views/users/show.html.erb +<p id="notice"><%= notice %></p> -<%= @user.name %>, <%= @user.email %> +<p> + <strong>Name:</strong> + <%= @user.name %> +</p> + +<p> + <strong>Email:</strong> + <%= @user.email %> +</p> + +<p> + <strong>User name:</strong> + <%= @user.user_name %> +</p> + +<%= link_to 'Edit', edit_user_path(@user) %> | +<%= link_to 'Back', users_path %> |