sinatra/sinatra-contrib — Issue #28: Sinatra::Namespace doesn't respect some settings?
Author: chanks
Created: 2011-12-31 20:46:22+00:00
State: open

In my main configure block I use:

set :haml, :format => :html5, :ugly => true

When I use the 'haml' helper to render a page for a normal (non-namespaced) route handler, it appears as I'd expect - with the HTML5 doctype and the ugly formatting. But when I use the 'haml' helper in a namespaced route handler, it appears that neither of these options are being respected.

I can work around this by doing haml :template, :format => :html5, :ugly => true in every namespaced route handler, which isn't exactly clean. I've tried using a set :haml line with the same options inside my namespace, but then I get a "may not set haml" error.