public
Description: The web app builder for Rails
Homepage: http://hobocentral.net
Clone URL: git://github.com/tablatom/hobo.git
hobo_helpers -- fixes to #query_params
tablatom (author)
Wed Jul 30 09:29:54 -0700 2008
commit  93d890d7e1bfee87fc736330ae99001ae2e8e0aa
tree    7f3c8ae6e75573cd8741518870093ae5d960e6ec
parent  1ce4f49c60553c7d2eb8fc2ddf4c787a597101df
...
344
345
346
347
 
348
349
350
351
 
352
353
354
...
344
345
346
 
347
348
349
350
 
351
352
353
354
0
@@ -344,11 +344,11 @@ module Hobo
0
     end
0
 
0
     def query_params
0
- query = request.request_uri.match(/(?:\?(.+))/)._?[1]
0
+ query = request.request_uri.match(/(?:\?([^?]+))/)._?[1]
0
       if query
0
         params = query.split('&')
0
         pairs = params.map do |param|
0
- pair = param.split('=')
0
+ pair = param.split('=', 2)
0
           pair.length == 1 ? pair + [''] : pair
0
         end
0
         HashWithIndifferentAccess[*pairs.flatten]

Comments

    No one has commented yet.