Padrino::Rendering::ClassMethods
Module: Padrino::Rendering::ClassMethods
Overview
Class methods responsible for rendering templates as part of a request.
Instance Method Summary
-
#cache_layout_path(name) ⇒ Object
-
#cache_template_path(options) ⇒ Object
-
#fetch_layout_path(given_layout, layouts_path = views) ⇒ Object
Returns the cached layout path. -
#layout(name = :layout) { ... } ⇒ Object
Use layout like rails does or if a block given then like sinatra.
Instance Method Details
#cache_layout_path(name) ⇒ Object
#cache_template_path(options) ⇒ Object
#fetch_layout_path(given_layout, layouts_path = views) ⇒ Object
Returns the cached layout path.
#layout(name = :layout) { ... } ⇒ Object
Use layout like rails does or if a block given then like sinatra. If used without a block, sets the current layout for the route.
By default, searches in your:
app
/views
/layouts
/application
.(haml
|erb
|xxx
) app
/views
/layout_name
.(haml
|erb
|xxx
)
If you define layout
:custom
then searches for your layouts in app
/views
/layouts
/custom
.(haml
|erb
|xxx
) app
/views
/custom
.(haml
|erb
|xxx
)
© 2010–2016 Padrino
Licensed under the MIT License.
http://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Rendering/ClassMethods