> Can you feed the Flash a URL instead of a path to a real file?
> Otherwise you can save the xml to a file just like you'd write any
> other file in ruby. Something like File.open('/path/to/file', 'w') { |
> f| f.puts @product.to_xml } should do the trick.
> --
> Justin Blakehttp://blog.adsdevshop.com
> On Sep 24, 4:39 pm, bmcc <barry.mcca...@gmail.com> wrote:
> > Hello All:
> > I have a general question on XML in rails. I know how to return an XML
> > view for the cleint to render but what if I dont want to render the
> > XML that is created? What if I want an XML file to be generated and
> > saved into a folder (through file IO.)
> > I know this will generate an XML view if the client requests for an
> > XML formatted document:
> > respond_to do |format|
> > format.html
> > format.xml { render :layout => false }
> > end
> > This works if I have an xml builder template available.
> > This just outputs a view with every column in XML without a builder
> > template
> > @product = Product.find(params[:id])
> > @orders = @product.orders
> > respond_to do |format|
> > format.html
> > format.xml { render :layout => false , :xml =>
> > @product.to_xml(:include => :orders) }
> > end
> > But I dont want to render the XML. I want to save out a file of a
> > partictular model in XML format and allow Flash to take that XML and
> > do its own rendering. Can someone give me some insight on this.
> > Thanks- Hide quoted text -
> - Show quoted text -