Rails 2.3 HTTP parameter extraction order

10 views
Skip to first unread message

tekwiz

unread,
Mar 22, 2009, 2:56:48 AM3/22/09
to Ruby on Rails: Core
In the docs for ActionView::Helpers::FormHelper#check_box, when
discussing why the method adds a hidden input tag _after_ the checkbox
tag, it says

"...Rails parameters extraction always gets the first occurrence of
any given key..."

I'm not sure this is still the case. I have a situation where I am
forced to use check_box_tag and hidden_tag. My code worked properly
in 2.2; however, upon migration to 2.3, the code doesn't work until I
move the hidden tags before the check-boxes. It does the same thing
in the latest versions of Safari 3.2 and Firefox 3.0. I checked the
HTTP traffic and the HTTP POST requests do have the parameters in the
proper order (i.e. the browsers are working correctly).

Can anybody else confirm this issue?

Xavier Noria

unread,
Mar 22, 2009, 8:04:25 AM3/22/09
to rubyonra...@googlegroups.com
On Sun, Mar 22, 2009 at 7:56 AM, tekwiz <twar...@gmail.com> wrote:

> In the docs for ActionView::Helpers::FormHelper#check_box, when
> discussing why the method adds a hidden input tag _after_ the checkbox
> tag, it says
>
>  "...Rails parameters extraction always gets the first occurrence of
> any given key..."
>
> I'm not sure this is still the case.

Indeed it changed in 2.3 but unfortunately the patch didn't update the
docs. We noticed this a few days ago, they are correct now in edge.

Xavier Noria

unread,
Jan 17, 2011, 3:12:42 PM1/17/11
to leivoset, rubyonra...@googlegroups.com
On Mon, Jan 17, 2011 at 9:09 PM, leivoset <leiv...@gmail.com> wrote:

> Is there any way this doc patch could be applied to the 2.3 branch? I
> spent hours trying to figure out what was going on after an upgrade to
> 2.3 because the documentation was invalid and there was nothing
> mentioning this change in the release notes...

If someone prepares a patch against 2.3 and opens a LH ticket with it
I'll apply it. Please submit the link to this thread so that I see it
for sure.

leivoset

unread,
Jan 18, 2011, 7:02:55 PM1/18/11
to Ruby on Rails: Core

Xavier Noria

unread,
Jan 19, 2011, 2:57:14 AM1/19/11
to rubyonra...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages