Created
October 24, 2012 17:40
-
-
Save didip/3947572 to your computer and use it in GitHub Desktop.
carrierwave-info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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