Skip to content

SixArm/sixarm_ruby_action_dispatch_response_json

Repository files navigation

SixArm.com → Ruby →
ActionPack Response#json method

Gem Version Build Status Code Climate

Introduction

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.

Install

Gem

To install this gem in your shell or terminal:

gem install sixarm_ruby_action_dispatch_response_json

Gemfile

To add this gem to your Gemfile:

gem 'sixarm_ruby_action_dispatch_response_json'

Require

To require the gem in your code:

require 'sixarm_ruby_action_dispatch_response_json'

About

SixArm.com » Ruby » ActionDispatch Response#json method

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages