Last active
August 29, 2015 14:04
-
-
Save namusyaka/87c6cd9d4904dfad95b2 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
diff --git a/Gemfile b/Gemfile | |
index aa19617..fa847b7 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -21,6 +21,7 @@ gem 'slim' | |
# Padrino Stable Gem | |
gem 'padrino', '0.12.2' | |
+gem 'rack-parser' | |
# Or Padrino Edge | |
# gem 'padrino', :github => 'padrino/padrino-framework' |
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
diff --git a/app/app.rb b/app/app.rb | |
index 606e221..3daefb4 100644 | |
--- a/app/app.rb | |
+++ b/app/app.rb | |
@@ -4,6 +4,7 @@ module First | |
register Padrino::Helpers | |
enable :sessions | |
+ use Rack::Parser, parsers: { 'application/json' => proc{|data| JSON.parse(data) } } | |
## | |
# Caching support. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment