I have two Model Product and Supplier.
Product has_one supplier.
how to Build a Seach form inside a form. ,I want to Search Supplier and Put that id into My Product form.
Currently my code look like this.
<%= f.text_field :product_code, class: 'form-control'%>
<%= f.text_field :product_name, class: 'form-control'%>
<%= f.text_field :supplier_id, class: 'form-control'%>
<%= render :partial => 'supplier_search' %>
<%= f.submit 'Save', :class=>'button add'%>