title: How to add multiple pdfs to zip file for download in rails
body: <p>I have a controller action that creates pdfs.
  I want to be able to get all the pdfs and save them in a zip file that the user can download.</p>
  
  <p>My controller currently only handles the creation of one pdf, I don't know how to </p>
  
  <pre><code>def showpdf
      respond_to do |format|
        format.html
        format.pdf do
          pdf = Prawn::Document.new(page_size:  "A4",margin: [0,0,0,0])
  
          #pdf creation stuff
  
          send_data pdf.render, filename: 'report.pdf', type: 'application/pdf'
        end
      end
  end
  </code></pre>
  
  <p>I am able to change it to generate multiple pdfs but I don't know where/how to store them before zipping them up for download...</p>