This project is archived and is in readonly mode.
Submitting arrays from forms
Reported by Tom | December 22nd, 2010 @ 03:36 PM
I have a remote form that uses the following text field helper,
but all values received by the controller are nil.
text_field_tag('post[tags[]]', post.tags[i])
If I change the tag as follows, it works fine:
text_field_tag('tags[]', post.tags[i])
Sorry, I'm not sure what else I should post on the issue?
Comments and changes to this ticket
-
Aditya Sanghi December 22nd, 2010 @ 04:23 PM
- State changed from new to invalid
- Importance changed from to Low
I'm not sure this would be the right forum to ask questions about Rails. This forum is primary for bugs/enhancements with Rails. You would be better off asking questions or seeking help on a forum like StackOverflow.com for example.
By the way you probably want to try this -
@@@@ ruby text_field_tag('post[tags][]', post.tags[i]) @@@@
Marking invalid for now.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>