diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-05-03 18:26:49 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-05-31 08:17:03 +0300 |
commit | 4464c22d6d23d893494682d309aec3fb31c11ae3 (patch) | |
tree | cb7490034185f79c88db472650b87afdcdbafa3f /app/uploaders/personal_file_uploader.rb | |
parent | 8039b9c3c6caedc19e0e44d086a007e8975134b7 (diff) |
Support descriptions for snippets
Diffstat (limited to 'app/uploaders/personal_file_uploader.rb')
-rw-r--r-- | app/uploaders/personal_file_uploader.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/uploaders/personal_file_uploader.rb b/app/uploaders/personal_file_uploader.rb index 969b0a20d38..7f857765fbf 100644 --- a/app/uploaders/personal_file_uploader.rb +++ b/app/uploaders/personal_file_uploader.rb @@ -10,6 +10,10 @@ class PersonalFileUploader < FileUploader end def self.model_path(model) - File.join("/#{base_dir}", model.class.to_s.underscore, model.id.to_s) + if model + File.join("/#{base_dir}", model.class.to_s.underscore, model.id.to_s) + else + File.join("/#{base_dir}", 'temp') + end end end |