Can anyone point me to the direction of creating a link that leads to
the downloading of a rails generated XML file. I have an app and a
database both called catalog, and I have
a controller called store, and a model called product. The database
has a products table with a handful of manually input product items.
The controller is quite plain with an index and a @products =
Product.find(:all)
How may I create a button or link that leads to the generating of an
XML file and one to Excel (is it possible? I mean, copyright and
loyalty to MS a concern?). And how can I make it so that after
clicking this link or button or both, the browser prompts for a
download instead of displaying it on itself like Firefox and Internet
Explorer do. Google Chrome just displays it in one line, I haven't
checked Safari yet.
Thank You for both of your suggestions. Let me try it out.
RobL, how does one format an XML file? I am sorry to trouble you if
this seems very elementary which I wouldn't suspect otherwise. Because
I thought XML is always just a bunch of structured data and Firefox is
the one that formats it and displays it.
Or do you mean, I giving the data the structure I want in that
rxml.erb file?