<% semantic_form_for(@product, :html => {:multipart => true}) do |f| %>
<% f.inputs do %>
<%= f.input :name %>
<%= f.input :price %>
<%= f.input :pno %>
<%= f.input :description %>
<%= f.input :shop_category %>
<% end %>
<% end %>
製品はShop_categoryに属し、Shop_categoryはShopに属します。
行を変更する方法:
<%= f.input :shop_category %>
選択ボックスにすべてのshop_categoriesを表示する代わりに、たとえば15のIDを持つShopに属するshop_categoriesのみを表示するには?