Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4343

Show
Ignore:
Timestamp:
05/16/06 20:56:41 (2 years ago)
Author:
nzkoz
Message:

Fix NoMethodError when parsing params like &&. [Adam Greenfield]. Closes #4955

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r4341 r4343  
    11*SVN* 
     2 
     3* Fix NoMethodError when parsing params like &&. [Adam Greenfield] 
    24 
    35* Fix flip flopped logic in docs for url_for's :only_path option. Closes #4998. [esad@esse.at] 
  • trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb

    r3936 r4343  
    4646 
    4747      for key, value in params 
     48        next if key.nil? 
    4849        value = [value] if key =~ /.*\[\]$/ 
    4950        unless key.include?('[') 
  • trunk/actionpack/test/controller/cgi_test.rb

    r3894 r4343  
    228228    assert_equal expected, CGIMethods.parse_request_parameters(input) 
    229229  end 
     230   
     231  def test_parse_params_with_nil_key 
     232    input = { nil => nil, "test2" => %w(value1) } 
     233    expected = { "test2" => "value1" } 
     234    assert_equal expected, CGIMethods.parse_request_parameters(input) 
     235  end 
    230236end 
    231237