sinatra/sinatra — pull request #728 by mattwildig (2013-06-14 23:05:34+00:00)
Title: Allow overriding global :layout => false setting 

See #727

`:layout` is used both to specify which layout to use, and also whether to render a layout at all. This results in the odd situation in #727. The default is set to `false` with

set :slim, :layout => false

Then in the call to the render method, `:layout` is explicitly set to `true`:

slim :index, :layout => true

Using `true` basically says “use the default layout here”, but the default layout is `false`, so no layout is rendered. Using another value here, e.g. `:layout => :layout` works as expected.

This PR fixes this simply by having a special case for this situation, so that the layout isn’t set to `false` and `@default_layout` (i.e. `"layout`) is used instead.