module Roda::RodaPlugins::Partials::InstanceMethods
def each_partial(enum, template, opts=OPTS)
For each object in the given enumerable, render the given
def each_partial(enum, template, opts=OPTS) unless opts.has_key?(:local) opts = Hash[opts] opts[:local] = render_each_default_local(template) end render_each(enum, partial_template_name(template.to_s), opts) end
def partial(template, opts=OPTS)
prefixes the template filename to use with an
Renders the given template without a layout, but
def partial(template, opts=OPTS) opts = parse_template_opts(template, opts) if opts[:template] opts[:template] = partial_template_name(opts[:template]) end render_template(opts) end
def partial_template_name(template)
def partial_template_name(template) segments = template.split('/') segments[-1] = "_#{segments[-1]}" segments.join('/') end