0

I have a form for creating a new user. I'd like to pass a paramater, page, with f.submit, something like:

<%= f.submit (:cove_id=>@cove)%>

Is this possible in Rails?

2 Answers 2

2

put the parameter inside the form, not in the submit button (for example, use a hidden_field to do that)

0
0

Also, if cove_id is a foreign key on a parent model (ie: your form model belongs_to cove), consider going the nested resources route.

http://guides.rubyonrails.org/routing.html#nested-resources

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.