<%= form_for(get_dejavu_for(@product)) do |f| %> <% if @product.errors.any? %>

<%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:

<% end %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :code %>
<%= f.text_field :code %>
<%= f.fields_for :category do |ctf| %> <%= ctf.label :category_name %> <%= ctf.text_field :name %> <% end %>
<%= f.fields_for :colors do |clf| %> <%= clf.label :color_name %> <%= clf.text_field :name %> <% end %>
<%= f.submit %>
<% end %>