lib/ramaze/view/nagoro/render_partial.rb in Pistos-ramaze-2009.04.08 vs lib/ramaze/view/nagoro/render_partial.rb in Pistos-ramaze-2009.06.12

- old
+ new

@@ -1,25 +1,25 @@ -require 'innate/helper/partial' +require 'innate/helper/render' module Nagoro module Pipe # 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 +options+. + # render_partial, all other paramters are passed on as +variables+. # - # Example calling render_partial('/hello'): - # <render src="/hello" /> + # Example calling render_partial('hello'): + # <render src="hello" /> # - # Example calling render_partial('/hello', 'tail' => 'foo'): - # <render src="/hello" tail="foo" /> + # Example calling render_partial('hello', 'tail' => 'foo'): + # <render src="hello" tail="foo" /> # class RenderPartial < Base - include Innate::Helper::Partial + include Innate::Helper::Render def tag_start(tag, attrs) - if tag == 'render' and src = attrs.delete('src') - append(render_partial(src, attrs)) + if tag == 'render' and action_name = attrs.delete('src') + append(render_partial(action_name, attrs)) else super end end