diff options
author | Colin Law <colin@clanlaw.org.uk> | 2009-01-11 12:13:50 +0000 |
---|---|---|
committer | Colin Law <colin@clanlaw.org.uk> | 2009-01-11 12:13:50 +0000 |
commit | 55901d7d86f5608c4a07386ca6378121eb8127cb (patch) | |
tree | 8ede6a21529dfac8c818a3fe1584fb46f00c03ff /actionpack/lib/action_controller/url_encoded_pair_parser.rb | |
parent | 3e60ea6c231810e2b850492a86874b4800dfbf27 (diff) | |
parent | cf4b24407ada79c133fbae1ec7db692882225956 (diff) | |
download | rails-55901d7d86f5608c4a07386ca6378121eb8127cb.tar.gz rails-55901d7d86f5608c4a07386ca6378121eb8127cb.tar.bz2 rails-55901d7d86f5608c4a07386ca6378121eb8127cb.zip |
Merge branch 'master' of git@github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_controller/url_encoded_pair_parser.rb')
-rw-r--r-- | actionpack/lib/action_controller/url_encoded_pair_parser.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/url_encoded_pair_parser.rb b/actionpack/lib/action_controller/url_encoded_pair_parser.rb index bea96c711d..9883ad0d85 100644 --- a/actionpack/lib/action_controller/url_encoded_pair_parser.rb +++ b/actionpack/lib/action_controller/url_encoded_pair_parser.rb @@ -70,11 +70,12 @@ module ActionController top[-1][key] = value else top << {key => value}.with_indifferent_access - push top.last - value = top[key] end + push top.last + return top[key] else top << value + return value end elsif top.is_a? Hash key = CGI.unescape(key) @@ -84,12 +85,10 @@ module ActionController else raise ArgumentError, "Don't know what to do: top is #{top.inspect}" end - - return value end def type_conflict!(klass, value) raise TypeError, "Conflicting types for parameter containers. Expected an instance of #{klass} but found an instance of #{value.class}. This can be caused by colliding Array and Hash parameters like qs[]=value&qs[key]=value. (The parameters received were #{value.inspect}.)" end end -end
\ No newline at end of file +end |