Skip to content

Instantly share code, notes, and snippets.

@steventux
Created April 18, 2012 15:29
Show Gist options
  • Save steventux/2414348 to your computer and use it in GitHub Desktop.
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).
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