summaryrefslogtreecommitdiff
path: root/app/views/users/_form.html.erb
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-03-03 14:16:43 -0500
committerDavisLWebb <davislwebb@ymail.com>2014-03-03 14:16:43 -0500
commita034c6fff6aad728eae7d7056e8e538f58a0e0e7 (patch)
tree57bea566725608b63868254fb26ec715a36ab8b4 /app/views/users/_form.html.erb
parent39e0c9ca280d16817eb8d7683d80788f2544ae5f (diff)
view stuff
Diffstat (limited to 'app/views/users/_form.html.erb')
-rw-r--r--app/views/users/_form.html.erb25
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 %>