app/views/products/_form.html.haml
= form_for @product do |f|
-if @product.errors.any?
#error_explanation
%h2= "#{pluralize(@product.errors.count, "error")} prohibited this product from being saved:"
%ul
- @product.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :title
= f.text_field :title
.field
= f.label :description
= f.text_area :description
.field
= f.label :price
= f.text_field :price
.field
= f.label :retired
= f.check_box :retired
.field
=f.label :category_list
=f.text_field :category_list
.actions
= f.submit 'Save'