jbuilder-prettify

This gem provides an easy way to configure pretty output with jbuilder.

Installation

Add this line to your application's Gemfile:

gem 'jbuilder-prettify'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jbuilder-prettify

Usage

Enable pretty output in development environment (config/environments/development.rb):

config.jbuilder.prettify = true

Or set in in every request

Jbuilder.prettify = %w( 1 true yes ).includes?(params[:pretty_json])

Contributing

  1. Fork it ( https://github.com/SICSoftwareGmbH/jbuilder-prettify/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Gem Version