Reputation: 19
I created a method post add from controller and passed two parameters (two IDs) by a link to a form in which the user can fill other information. I want the 'Submit' button to create an object which would take two IDs as its attributes.
How can I do this?
Upvotes: 0
Views: 50
Reputation: 4003
You can use hiddent_field tag for this
<%= f.hidden_field :id_1, value: "ID" %>
Upvotes: 3