<%= form_for(:offer,:url=>{:controller=>'offers',:action=>'combo'}) do |f|%>
<%= f.label "Select Category:" %>
<%= f.select :catId_buy1, options_from_collection_for_select(@categories, "id", "name"), prompt: "Select Category"%>
<%= f.label "Select Menu:" %>
<%= f.collection_select :menuName_buy1, Menu.all,:menu_item_name,:menu_item_name, prompt: "Select Menu Item"%>
<%= f.label "Discountable Quantity:" %>
<%= f.number_field :qty_buy1%>
<%= submit_tag("Create New Offer")%>
<%end%>
I am new in rails.I have a dropdown in other page which have values from 1-10.If i select 4 from this dropdown then i want to create controllers like (catId_buy2,menuName_buy2,qty_buy2),(catId_buy3,menuName_buy3,qty_buy3)
and so on. Please help me.