Object
A transformer for <render /> tags.
Setup:
pipeline = Ramaze::Template::Ezamar::TRANSFORM_PIPELINE pipeline.put_after(::Ezamar::Element, ::Ezamar::RenderPartial) pipline.uniq!
See /examples/basic/partial.rb for usage.
Renders <render src="/path" [optional="option", ...]> in place.
Other options than `src` will be transformed to session parameters for the rendered action to use.
# File lib/ezamar/render_partial.rb, line 24 def self.transform(template) template.gsub!(/<render (.*?) \/>/) do |m| args = Hash[*$1.scan(/(\S+)=["'](.*?)["']/).flatten] if src = args.delete('src') render_partial(src, args) end end template end
Generated with the Darkfish Rdoc Generator 2.