This project is archived and is in readonly mode.
POST variables order
Reported by ifesdjeen | February 8th, 2011 @ 03:52 PM
Hi,
It seems that Rails and Rack reliy on the order of variables in POST/GET when parsing those.
Sample is quite long, so i've put it in separate gist: https://gist.github.com/816599
If we get rid of "first[second]", and replace it with just "second", same thing repeats.
Seems that it's rarely met because most of people first specify at least one field from their primary model and only then start specifying underlying model fields.
Could you please take a look? Maybe there's a better solution for my problem, which i'm looking for right now.
Thanks
Comments and changes to this ticket
-
ifesdjeen February 9th, 2011 @ 06:00 PM
Please see a failing test.
A bit more details:
If you have a form, like:
User => Blogs => Posts, and all of the fields should be dynamic, and you want to modify them on the client side without many round trips to server.It will work only in case when comment params are before rating params in HTTP set. Otherwise one of the Rating params will get lost.
(sorry if the example doesn't seem to be realistic. just think of any three-level deep model, most of time these things happen to user models, when user have something that has something)
Thank you
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>