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:
parent
e801b5aab5
commit
9420a9b893
1 changed files with 2 additions and 1 deletions
|
@ -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?
|
||||||
|
|
Loading…
Reference in a new issue