Skip to content

Commit

Permalink
Teach rack test driver to work with comlex field names such as user[p…
Browse files Browse the repository at this point in the history
  • Loading branch information
lysenko committed Oct 10, 2010
1 parent 5bbcf7d commit a1112d7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/capybara/driver/rack_test_driver.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'rack/test'
require 'rack/utils'
require 'mime/types'
require 'nokogiri'
require 'cgi'
Expand Down Expand Up @@ -163,16 +164,7 @@ def method
end

def merge_param!(params, key, value)
collection = key.sub!(/\[\]$/, '')
if collection
if params[key]
params[key] << value
else
params[key] = [value]
end
else
params[key] = value
end
Rack::Utils.normalize_params(params, key, value)
end
end

Expand Down

0 comments on commit a1112d7

Please sign in to comment.