_form.html.erb 586 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="actions">
    <%= f.submit %>
  </div>
<% end %>