Xml from a var

If I form and/or build up xml in a model or controller and assign it
to a var how do I get a page to display the xml?

render :xml => {:name => “David”}.to_xml

Renders ‘David’

should be the last line in the action

Make x variable class attribute by naming it @x and use next code in
your
View :
<%= @x %>

No I am doing this:

def assert_xml_message(type,msg)
x = gen_basic_xml
x.response do
x.tag!(type) do
x.message msg
end
end
end

x is a var with xml.

Sorry, i mean object attribute.

2010/4/21 сбк [email protected]