diff options
Diffstat (limited to 'app/views/users/_form.html.erb')
-rw-r--r-- | app/views/users/_form.html.erb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb new file mode 100644 index 0000000..56d9f90 --- /dev/null +++ b/app/views/users/_form.html.erb @@ -0,0 +1,25 @@ +<%= 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="actions"> + <%= f.submit %> + </div> +<% end %> |