Hi, I would like to generate rss or any xml in one of the actions and ofcourse display it. I have a big problem to get it working. API says that if I construct xml= Builder::XmlMarkup.new xml.em("emphasized") the xml object should be available in .rxml template. But in API i haven''t found info about how should i use this xml object. If i delete rxml template i get missing template error when i leve template empty I get output consists of word :) "nil" - have no idea what is nil. When i use <%=xml%> or <%xml%> or <%=@xml%> or <%@xml%> (for the last two I have create @xml object inside action ), paser complains about xml object or something. Object xml has is beeing created ok (<em>emphasized</em><to_s/>) but then i have no Idea how should i display it ! By the way why API says xml object is avaiable in template. Why musn''t it be @xml. Anyway I definetly missed something and need your help :) Jacek Balcerski
> By the way why API says xml object is avaiable in template. Why musn''t > it be @xml. > Anyway I definetly missed something and need your help :)Remember that your Builder-styled templates must reside in a file ending in .rxml. When it does so, Action Pack will automatically pick up that it should make xml available as a local (not instance) variable. Have a look at the example on http://ap.rubyonrails.org/classes/ActionView/Base.html. Basically, just copy''n''paste that code snippet into your own .rxml file and replace the values. That''s what I do when I need a new RSS script ;) -- David Heinemeier Hansson, http://www.basecamphq.com/ -- Web-based Project Management http://www.rubyonrails.org/ -- Web-application framework for Ruby http://macromates.com/ -- TextMate: Code and markup editor (OS X) http://www.loudthinking.com/ -- Broadcasting Brain