Displaying 1 result from an estimated 1 matches for "bundle_filenam".
Did you mean:
bundle_filename
2012 Jul 18
0
Zipping files contained in a dir (rubyzip)
hey so I''m trying to zip all the files contained in a directory
(RubyZip). heres what I have:
def bundle
#create the ZIPfile with the title of (:id).zip
bundle_filename = "public/attachments/#{self.id}/#{self.id}.zip"
#open the ZIPfile in order to add items in
Zip::ZipFile.open(bundle_filename, Zip::ZipFile::CREATE) {
|zipfile|
Dir.foreach("public/attachments/#{self.id}") do |item|
t = File.open(item)...