admin controller tests, sans question
This commit is contained in:
7
app/views/admin/user/_form.html.erb
Normal file
7
app/views/admin/user/_form.html.erb
Normal file
@ -0,0 +1,7 @@
|
||||
<%= form_for user, url: action do |f| %>
|
||||
<p>Name: <%= f.text_field :name %></p>
|
||||
<p>eMail: <%= f.email_field :email %></p>
|
||||
<p>Role: <%= f.text_field :role %></p>
|
||||
|
||||
<%= f.submit %>
|
||||
<% end %>
|
@ -1,2 +1,4 @@
|
||||
<h1>Admin::Users#edit</h1>
|
||||
<p>Find me in app/views/admin/users/edit.html.erb</p>
|
||||
|
||||
<%= render partial: 'form', locals: {user: @user, action: admin_update_user_path } %>
|
||||
|
@ -1,2 +1,4 @@
|
||||
<h1>Admin::Users#new</h1>
|
||||
<p>Find me in app/views/admin/users/new.html.erb</p>
|
||||
|
||||
<%= render partial: 'form', locals: {user: @user, action: admin_create_user_path } %>
|
||||
|
@ -1,2 +1,6 @@
|
||||
<h1>Admin::Users#view</h1>
|
||||
<p>Find me in app/views/admin/users/view.html.erb</p>
|
||||
|
||||
<main>
|
||||
<%= @user.name %>
|
||||
</main>
|
||||
|
Reference in New Issue
Block a user