1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

added disable :layout by default

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
This commit is contained in:
burningTyger 2011-01-08 02:13:06 +01:00 committed by Konstantin Haase
parent e801b5aab5
commit 9420a9b893

View file

@ -525,7 +525,8 @@ Templates may also be defined using the top-level <tt>template</tt> method:
end end
If a template named "layout" exists, it will be used each time a template If a template named "layout" exists, it will be used each time a template
is rendered. You can disable layouts by passing <tt>:layout => false</tt>. is rendered. You can individually disable layouts by passing <tt>:layout => false</tt>
or disable them by default via <tt>set :haml, :layout => false</tt>.
get '/' do get '/' do
haml :index, :layout => !request.xhr? haml :index, :layout => !request.xhr?