Answer the question
In order to leave comments, you need to log in
How to handle multiple inputs with the same name in Rails?
Let's say there are two inputs in the form with the same name:
<input type='text' name='adress' />
<input type='text' name='adress' />
Answer the question
In order to leave comments, you need to log in
// EDIT: indexes are optional.
<input type='text' name='adress[]' />
<input type='text' name='adress[]' />
...
<input type='text' name='adress[]' />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question