title: rendering open office files in ruby on rails
body: <p>I'm trying to render .odf files from a controller action in a rails application.  I'd like to be able to put templates inside my view folders called show.odp.erb, show.odf.erb, etc.. and have that represent the content.xml file that is inside the zip.  I'd also like to be able to render these actions in the controller like so: </p>
  
  <pre><code>respond_to do |format|
    format.odf {
      #odf code here
    }
    format.odp {
      #probably about the same as the odf code, but renders a different template with a different file extension.
    }
  </code></pre>
  
  <p>I would also like to have a template content.xml file in my layouts directory that has the necessary headers and footers. The main questions I have are these:</p>
  
  <p>should I put all .odf files in one folder in the layouts directory? or should i put the static ones in the public directory?</p>
  
  <p>how can i insert the dynamic content.xml file into the directory before I zip it up and serve it?  I hope this is an easy enough question for a render guru out there ;)</p>