Displaying 3 results from an estimated 3 matches for "xml_builder".
Did you mean:
pm_builder
2007 Sep 04
5
Xml templates...
I was looking in using an xml_builder template to do something like:
blee.xerb
xml.blees do
<% for blee in @blees %>
xml.blee = blee.name
<% end %>
end
It looks like the xml_builder template can''t expand the erb tag.
It this not the correct way to expand and xml template ?
Thanks !
-------------- next...
2007 Jul 19
0
xml builder cache (with a slight problem on initial load)
...dule Caching
module Fragments
def cache_xml_fragment(block, xml, name = {}, options = nil)
unless perform_caching then block.call; return end
if cache = read_fragment(name, options)
xml << cache
else
buffer = ''''
xml_builder = Builder::XmlMarkup.new(:target=>buffer)
block.call(xml_builder)
write_fragment(name,buffer, options)
xml << buffer
end
end
end
end
end</code>
To use the cache_xml you pass the current xml object and the ''name'' of
t...
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other
than Erubis are not loaded automatically (Haml, XMLBuilder). Either
this should be fixed, or the documentation should be updated to
instruct people how to use non-Erb template engines.
Apparently the solution is to do something like this in merb_init.rb:
::Merb::AbstractController.register_engine