drhenner/ror_ecommerce

View on GitHub
app/views/admin/merchandise/wizards/brands/_form.html.erb

Summary

Maintainability
Test Coverage
<% if @brand.errors.any? %>
  <div id="error_explanation">
    <h2><%= pluralize(@brand.errors.count, "error") %> prohibited this brand from being saved:</h2>

    <ul>
    <% @brand.errors.full_messages.each do |msg| %>
      <li><%= msg %></li>
    <% end %>
    </ul>
  </div>
<% end %>

<div class="field">
  <%= f.label :name %><br />
  <%= f.text_field :name %>
</div>

<%= submit_tag "Create Brand", class: "button" %>