_form.html.erb 782 B

123456789101112131415161718192021222324252627282930313233
  1. <%= form_for(@user) do |f| %>
  2. <% if @user.errors.any? %>
  3. <div id="error_explanation">
  4. <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
  5. <ul>
  6. <% @user.errors.full_messages.each do |msg| %>
  7. <li><%= msg %></li>
  8. <% end %>
  9. </ul>
  10. </div>
  11. <% end %>
  12. <div class="field">
  13. <%= f.label :email %><br />
  14. <%= f.text_field :email %>
  15. </div>
  16. <div class="field">
  17. <%= f.label :password %><br />
  18. <%= f.text_field :password %>
  19. </div>
  20. <div class="field">
  21. <%= f.label :name %><br />
  22. <%= f.text_field :name %>
  23. </div>
  24. <div class="field">
  25. <%= f.label :quota %><br />
  26. <%= f.number_field :quota %>
  27. </div>
  28. <div class="actions">
  29. <%= f.submit %>
  30. </div>
  31. <% end %>