class Nagoro::Pipe::RenderPartial

Pipe that transforms <render /> tags.

the src parameter in the render tag will be used as first parameter to render_partial, all other paramters are passed on as variables.

Example calling render_partial('hello'):

<render src="hello" />

Example calling render_partial('hello', 'tail' => 'foo'):

<render src="hello" tail="foo" />

Public Instance Methods

tag_end(tag) click to toggle source
Calls superclass method
# File lib/ramaze/view/nagoro/render_partial.rb, line 27
def tag_end(tag)
  super unless tag == 'render'
end
tag_start(tag, attrs) click to toggle source
Calls superclass method
# File lib/ramaze/view/nagoro/render_partial.rb, line 19
def tag_start(tag, attrs)
  if tag == 'render' and action_name = attrs.delete('src')
    append(render_partial(action_name, attrs))
  else
    super
  end
end