_form.html.erb
816 Bytes
<%= form_for(@host) do |f| %>
<% if @host.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@host.errors.count, "error") %> prohibited this host from being saved:</h2>
<ul>
<% @host.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :uri %><br>
<%= f.text_field :uri %>
</div>
<div class="field">
<%= f.label :password %><br>
<%= f.password_field :password %>
</div>
<div class="field">
<%= f.label :password_confirmation %><br>
<%= f.password_field :password_confirmation %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>