Created
April 25, 2012 02:06
-
-
Save christopherslee/2485525 to your computer and use it in GitHub Desktop.
Rails turns JSON array into numbered hash in controller params
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
app = window.app = { | |
doSomething: -> | |
jQuery.ajax | |
type : "POST" | |
path : "/" | |
datatype : "JSON" | |
data : { arraystuff : [ { foo : "bar" }, { bar : "baz" }, { baz : "bop" } ] } | |
return | |
} |
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
Started POST "/" for 127.0.0.1 at 2012-04-24 22:10:15 -0400 | |
Processing by WelcomeController#index as */* | |
Parameters: {"arraystuff"=>{"0"=>{"foo"=>"bar"}, "1"=>{"bar"=>"baz"}, "2"=>{"baz"=>"bop"}}} | |
Rendered welcome/index.html.erb within layouts/application (0.0ms) | |
Completed 200 OK in 19ms (Views: 18.8ms | ActiveRecord: 0.0ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment