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
- Fork it ( https://github.com/SICSoftwareGmbH/jbuilder-prettify/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request