I am building an app with react-rails. I am trying to add multiple forms to a single page by adding custom actions to the controller.
In the past with pure rails I was able to do like so:
<%= form_for @food, :url=>{:controller=>"dailies", :action=>"food_create"}, remote: true, html: { class: "form-horizontal", style: "display:inline;" } do |f| %>
This is how I'm rendering the form:
render: ->
React.DOM.form
action: '/student/food_create'
className: 'form-inline'
onSubmit: @handleSubmit
That looks about right. I don't quite understand your question, though.
You might add 2 more props to the
React.DOM.form
to match the Rails form: