Rack Beautifier is a tiny middleware that runs every HTML response through htmlbeautifier. In Rails it installs automatically and prettifies the output that hits the browser, which helps when inspecting rendered templates during development.
Add the gem to your application's Gemfile:
gem "rack_beautifier", github: "CuddlyBunion341/rack-beautifier"Then bundle install. The middleware is inserted automatically into Rails via a Railtie.
With Rails no further setup is required. For a pure Rack app, add the middleware manually:
use RackBeautifier::MiddlewareResponses marked as text/html are beautified on the fly. Other responses pass through untouched.