Skip to content

Instantly share code, notes, and snippets.

@didip
Created October 24, 2012 17:40
Show Gist options
  • Save didip/3947572 to your computer and use it in GitHub Desktop.
Save didip/3947572 to your computer and use it in GitHub Desktop.
carrierwave-info
# the initializer
CarrierWave.configure do |config|
config.storage = :file
config.root = Rails.root.join('public')
config.cache_dir = Rails.root.join('tmp/uploads')
config.enable_processing = false
end
# the uploader
class PdfVoucherUploader < CarrierWave::Uploader::Base
def store_dir
"pdfs/vouchers"
end
def filename=(name)
@filename = name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment