Partials every-where
Hi everybody,
Partials are not limited to be used for HTML rendering.
They can be used for XML too.
Here is an example file ( _details.builder )
xml.name user.name
xml.gender user.gender
xml.age user.age
This can be used in another regular builder file as follows:
xml.instruct! : xml, :version=>”1.0″
xml.users {
for user in users
xml <”users/details” , :locals=>{:user=>user})
end
}
Hope, this comes handy
Advertisement

Nice post said,
May 7, 2010 at 11:10 am
Good to see your blog being updated. Why not we have these articles written in the webile blog.