Created
April 18, 2012 15:29
-
-
Save steventux/2414348 to your computer and use it in GitHub Desktop.
Getting Padrino to play nicely with Content-Type => 'application/json' (the default for Backbone JS).
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
use Rack::Parser, :content_types => { | |
'application/json' => Proc.new { |body| ::MultiJson.decode body } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment