Skip to content

Instantly share code, notes, and snippets.

@newtonapple
Created November 2, 2009 20:14
Show Gist options
  • Save newtonapple/224421 to your computer and use it in GitHub Desktop.
Save newtonapple/224421 to your computer and use it in GitHub Desktop.
Rails like params hash from URL encoded strings.
ActionController::AbstractRequest.parse_query_parameters('foo[foo][0]=99') # => {"foo"=>{"foo"=>{"0"=>"99"}}}
ActionController::AbstractRequest.parse_query_parameters('foo[foo][]=99') # => {"foo"=>{"foo"=>["99"]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment