Skip to content

Instantly share code, notes, and snippets.

@stympy
Created April 1, 2009 04:11
Show Gist options
  • Save stympy/88538 to your computer and use it in GitHub Desktop.
Save stympy/88538 to your computer and use it in GitHub Desktop.
Zip::ZipFile.open(zipfile, Zip::ZipFile::CREATE) do |zip|
submissions.each do |submission|
submission.attachments.each do |file|
zip.add(file.relative_path, file.full_filename)
end
end
zip.add('submissions.xml', xmlfile)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment