diff options
author | DavisLWebb <davislwebb@ymail.com> | 2014-03-01 20:23:29 -0500 |
---|---|---|
committer | DavisLWebb <davislwebb@ymail.com> | 2014-03-01 20:23:29 -0500 |
commit | 2eb242f3e5b1f1ab66d84556cabcad965fe387aa (patch) | |
tree | d80e7422f39ef2b49801dbefd586e8e48500e43b /app/views | |
parent | 318d7649200fd51c7b1582c3f93534de9f2a3cf5 (diff) |
changed the user section of the generate
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/users/_form.html.erb | 29 | ||||
-rw-r--r-- | app/views/users/edit.html.erb | 6 | ||||
-rw-r--r-- | app/views/users/index.html.erb | 31 | ||||
-rw-r--r-- | app/views/users/index.json.jbuilder | 4 | ||||
-rw-r--r-- | app/views/users/new.html.erb | 5 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 19 | ||||
-rw-r--r-- | app/views/users/show.json.jbuilder | 1 |
7 files changed, 0 insertions, 95 deletions
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb deleted file mode 100644 index 2d1ad24..0000000 --- a/app/views/users/_form.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<%= form_for(@user) do |f| %> - <% if @user.errors.any? %> - <div id="error_explanation"> - <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> - - <ul> - <% @user.errors.full_messages.each do |msg| %> - <li><%= msg %></li> - <% end %> - </ul> - </div> - <% end %> - - <div class="field"> - <%= f.label :name %><br> - <%= f.text_area :name %> - </div> - <div class="field"> - <%= f.label :pw_hash %><br> - <%= f.text_area :pw_hash %> - </div> - <div class="field"> - <%= f.label :groups %><br> - <%= f.number_field :groups %> - </div> - <div class="actions"> - <%= f.submit %> - </div> -<% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb deleted file mode 100644 index 99bd4cc..0000000 --- a/app/views/users/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -<h1>Editing user</h1> - -<%= render 'form' %> - -<%= link_to 'Show', @user %> | -<%= link_to 'Back', users_path %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb deleted file mode 100644 index 14739ae..0000000 --- a/app/views/users/index.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<h1>Listing users</h1> - -<table> - <thead> - <tr> - <th>Name</th> - <th>Pw hash</th> - <th>Groups</th> - <th></th> - <th></th> - <th></th> - </tr> - </thead> - - <tbody> - <% @users.each do |user| %> - <tr> - <td><%= user.name %></td> - <td><%= user.pw_hash %></td> - <td><%= user.groups %></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> - </tr> - <% end %> - </tbody> -</table> - -<br> - -<%= link_to 'New User', new_user_path %> diff --git a/app/views/users/index.json.jbuilder b/app/views/users/index.json.jbuilder deleted file mode 100644 index 58c42c1..0000000 --- a/app/views/users/index.json.jbuilder +++ /dev/null @@ -1,4 +0,0 @@ -json.array!(@users) do |user| - json.extract! user, :id, :name, :pw_hash, :groups - json.url user_url(user, format: :json) -end diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb deleted file mode 100644 index efc0404..0000000 --- a/app/views/users/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<h1>New user</h1> - -<%= render 'form' %> - -<%= link_to 'Back', users_path %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb deleted file mode 100644 index 05150f5..0000000 --- a/app/views/users/show.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<p id="notice"><%= notice %></p> - -<p> - <strong>Name:</strong> - <%= @user.name %> -</p> - -<p> - <strong>Pw hash:</strong> - <%= @user.pw_hash %> -</p> - -<p> - <strong>Groups:</strong> - <%= @user.groups %> -</p> - -<%= link_to 'Edit', edit_user_path(@user) %> | -<%= link_to 'Back', users_path %> diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder deleted file mode 100644 index 968b383..0000000 --- a/app/views/users/show.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.extract! @user, :id, :name, :pw_hash, :groups, :created_at, :updated_at |