Skip to content

Commit 1df09c7

Browse files
committed
Merge pull request #39 from garrettlancaster/master
Update README to reflect Rails 5
2 parents fb4cc93 + cc02864 commit 1df09c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,16 @@ module JSONAPI
513513
MIMETYPE = "application/vnd.api+json"
514514
end
515515
Mime::Type.register(JSONAPI::MIMETYPE, :api_json)
516+
517+
# Rails 4
516518
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime::Type.lookup(JSONAPI::MIMETYPE)] = lambda do |body|
517519
JSON.parse(body)
518520
end
521+
522+
# Rails 5 moved DEFAULT_PARSERS
523+
ActionDispatch::Http::Parameters::DEFAULT_PARSERS[Mime::Type.lookup(JSONAPI::MIMETYPE)] = lambda do |body|
524+
JSON.parse(body)
525+
end
519526
```
520527

521528
## Unfinished business

0 commit comments

Comments
 (0)