If you are creating Rack middleware that changes the HTML response, use Rack::Plastic to get a head start. Rack::Plastic takes care of the boilerplate Rack glue so that you can focus on simply changing the HTML.
Wyatt Greene
gem "rack-plastic", "~> 0.1.3"