- Git: https://github.com/SixArm/sixarm_ruby_action_dispatch_response_json
- Doc: http://sixarm.com/sixarm_ruby_action_dispatch_response_json/doc
- Gem: https://rubygems.org/gems/sixarm_ruby_action_dispatch_response_json
- Contact: Joel Parker Henderson, joel@sixarm.com
- Project: changes, license, contributing.
This gem extends ActionPack Response with JSON API methods.
You can replace this:
JSON.parse(response.body)
With this:
response.json
You can replace these:
response.json["data"]
response.json["errors"]
response.json["linked"]
response.json["links"]
response.json["meta"]
With these:
response.data
response.errors
response.linked
response.links
response.meta
For docs go to http://sixarm.com/sixarm_ruby_action_dispatch_response_json/doc
Want to help? We're happy to get pull requests.
To install this gem in your shell or terminal:
gem install sixarm_ruby_action_dispatch_response_json
To add this gem to your Gemfile:
gem 'sixarm_ruby_action_dispatch_response_json'
To require the gem in your code:
require 'sixarm_ruby_action_dispatch_response_json'