link_to_add_nested(form,:order_items,'#order-items',tag:'button',tag_attributes:{type:'submit',name:'commit',value:'add-nested'})# now you have a button tag that will submit your form with a `commit` param with
Before the era of JavaScript-heavy single-page applications (SPAs), forms were the major way to create web applications that include user input. Traditionally, the user would fill in the form and click a “Submit” button, and the server-side code would handle the response. Forms were the ...