<h1>New Category</h1>

<div class="wide box">
  <%= form_for(@category) do |f| %>
    <div id="error_explanation">
      <ul>
        <% @category.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>

    <p>
      <%= f.label :name %><br />
      <%= f.text_field :name %>
    </p>
    <p>
      <%= f.label :domain %><br />
      <%= f.select :domain, @category.domains.invert %>
    </p>
    <p>
      <%= f.submit 'Create' %>
    </p>
  <% end %>
</div>

<%= link_to 'Back', categories_path %>
