See ticket: http://dev.rubyonrails.org/ticket/5923
And changeset: http://dev.rubyonrails.org/changeset/4821
Why did david change request_parameters to use the method that
-doesn''t- do implicit hash construction?
From comments in cgi_methods.rb:
# Returns a hash with the pairs from the query string. The
implicit hash construction that is done in
# parse_request_params is not done here.
def parse_query_parameters(query_string)
This fits in cgi_test.rb:
def test_parse_params_with_nested_attributes
input =
"user%5Blogin%5D=my_username&user%5Bpassword%5D=apassword"
expected = {:user => {:login => ''my_username'',
:password => ''apassword''}}
assert_equal expected, CGIMethods.parse_query_parameters(input)
end
And fails wonderously.
1) Failure:
test_parse_params_with_nested_attributes(CGITest)
[/Users/kev/code/rails/actionpack/test/controller/cgi_test.rb:223]:
<{:user=>{:login=>"my_username",
:password=>"apassword"}}> expected but was
<{"user[login]"=>"my_username",
"user[password]"=>"apassword"}>.
--
Kevin Clark
http://glu.ttono.us
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---
Julian ''Julik'' Tarkhanov
2006-Aug-26 21:09 UTC
Re: Params => hashes fscked after 4821. test case included.
On 26-aug-2006, at 19:02, Kevin Clark wrote:> > See ticket: http://dev.rubyonrails.org/ticket/5923 > And changeset: http://dev.rubyonrails.org/changeset/4821I''ve been plowing on http://dev.rubyonrails.org/ticket/5919 instead looks like this new dandy QSS thing does not know that brackets might be escaped. And exactly because it''s so fancy I couldn''t understand how to fix it properly (regexes all over the place just use the brackets verbatim in classes). Got no idea why this parser solution hs been introduced in the first place, by the way. -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Julian ''Julik'' Tarkhanov
2006-Aug-27 01:48 UTC
Re: Params => hashes fscked after 4821. test case included.
On 26-aug-2006, at 23:09, Julian ''Julik'' Tarkhanov wrote:> > > On 26-aug-2006, at 19:02, Kevin Clark wrote: > >> >> See ticket: http://dev.rubyonrails.org/ticket/5923 >> And changeset: http://dev.rubyonrails.org/changeset/4821 > > I''ve been plowing on http://dev.rubyonrails.org/ticket/5919 instead > looks like this new dandy QSS thing does not know that brackets might > be escaped.Responding to David (Akismet on the trac blocks anything I throw at him) - the zip file has the test case and a quick&dirty fix. Both Safari and FF send brackets encoded in POST. -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Hey folks,
the same thing is happening after changelist: 4866, but with a catch.
Under OSX running lighttpd or mongrel, this changelist works fine.
However, at a shared hosting service that is using Linux (CentOS) and
Apache -> Mongrel, the param hash is not being nested.
On my Mac, I see this for a request submitted from a form:
Processing BetasController#create (for 127.0.0.1 at 2006-08-29
06:12:34) [POST] Session ID: cb79f9c96d7ab3d8fee60f6cd8884f5d
Parameters: {"commit"=>"Signup",
"action"=>"create",
"beta"=>{"email"=>"nope@nope.com"},
"controller"=>"betas"}
but on the hosting service I see (notice how beta[email] is not
nested?):
Processing BetasController#create (for 24.21.195.158 at 2006-08-29
10:22:33) [POST] Session ID: a2ea5dd42d35f0966608dc9be7fc3b39
Parameters: {"commit"=>"Signup",
"beta[email]"=>"nope@nope.com",
"action"=>"create",
"controller"=>"betas"}
Unfortunatly I can''t track it down for about 2 weeks as I need the
hosted app to be stable. But I did want to let people know.
Regards,
Adam Greene
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---