Created
March 15, 2009 14:48
-
-
Save svenfuchs/79436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<select type="text" name="filters[body][][scope]"><option name="contains">contains</option></select> | |
<input type="text" name="filters[body][][query]" value="foo"> | |
<select type="text" name="filters[body][][scope]"><option name="starts_with">starts_with</option></select> | |
<input type="text" name="filters[body][][query]" value="bar"> | |
<input type="submit" id="submit" value="submit"> | |
</form> | |
# when send through browser (safari, firefox) | |
{"body"=>[{"scope"=>"contains", "query"=>"foo"}, {"scope"=>"starts_with", "query"=>"bar"}]} | |
# when send through webrat form submit in Rails | |
{"body"=>[{"query"=>"foo"}, {"scope"=>"contains", "query"=>"bar"}, {"scope"=>"starts_with"}]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment