ruby on rails - Create a form data when saving another form -
i need able save form's data when data form sent. should know 2 forms not related
these 2 forms:
<%= form_for(@relcliruta, remote: true, html: {class: "form-horizontal"}) |f| %> <!--ajax remote: true--> <div class="field"> <%= f.hidden_field :idruta, value: params[:id] %> </div> <div class="field"> <%= f.hidden_field :idcliente, value: cliente.id%> </div> <div class="field"> <%= f.hidden_field :idempresa, value: current_usuario.empresa_id %> </div> </div> <%= submit_tag "aƱadir", class: "btn btn-warning btn-xs"%> <%end%> <%= form_for(@reldayc, remote: true, html: {class: "form-horizontal"}) |f| %> <!--ajax remote: true--> <%= f.hidden_field :rutaid, value: params[:id] %> <%= f.hidden_field :codcli, value: cliente.id%> <%= f.hidden_field :idempresa, value: current_usuario.empresa_id %> <%end%>
Comments
Post a Comment