Method: Roda::RodaPlugins::Render::InstanceMethods#view
- Defined in:
- lib/roda/plugins/render.rb
#view(template, opts = OPTS) ⇒ Object
Render the given template. If there is a default layout for the class, take the result of the template rendering and render it inside the layout. See Render for details.
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/roda/plugins/render.rb', line 234 def view(template, opts=OPTS) opts = parse_template_opts(template, opts) content = opts[:content] || render_template(opts) if layout_opts = view_layout_opts(opts) content = render_template(layout_opts){content} end content end |