uploader fixes

This commit is contained in:
2014-07-18 01:03:14 +05:30
parent f8a5b57050
commit d1d1e6c7e1
2 changed files with 18 additions and 8 deletions

View File

@@ -12,6 +12,10 @@ class BeispieldateiUploader < CarrierWave::Uploader::Base
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
def root
Rails.root.join 'public/'
end
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end