Class methods responsible for rendering templates as part of a request.
#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. Returns the cached layout path.
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–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Rendering/ClassMethods