summaryrefslogtreecommitdiff
path: root/app/views/users/_form.html.erb
diff options
context:
space:
mode:
authorTomer Kimia <tkimia@purdue.edu>2014-03-03 19:00:25 -0500
committerTomer Kimia <tkimia@purdue.edu>2014-03-03 19:00:25 -0500
commitfb8aedbf8f39c627e6537c567f030b389cfb3cfb (patch)
tree714e1a5294f839c4a5c22195e5f4685af847f6a8 /app/views/users/_form.html.erb
parent38c41dc461244832d739b755e073989c61dacf47 (diff)
parentcd69a777235e96266d4ed101ef22de7ed1308dd5 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
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 %>