module Roda::RodaPlugins::Partials

  1. lib/roda/plugins/partials.rb

The partials plugin adds a partial method, which renders templates without the layout.

plugin :partials, views: 'path/2/views'

Template files are prefixed with an underscore:

partial('test')     # uses _test.erb
partial('dir/test') # uses dir/_test.erb

This is basically equivalent to:


Note that this plugin automatically loads the :render plugin.


Public Class

  1. load_dependencies

Public Class methods

load_dependencies (app, opts=OPTS)

Depend on the render plugin, since this overrides some of its methods.

[show source]
   # File lib/roda/plugins/partials.rb
25 def self.load_dependencies(app, opts=OPTS)
26   app.plugin :render, opts
27 end