a8c62dfe5c
- Moves a duplicate `file_storage?` definition into the common `GitlabUploader` ancestor. - Get the `uploads` base directory from a class method rather than hard-coding it where it's needed. This will be used in a subsequent MR to store Uploads in the database. - Improves the specs for uploaders.
9 lines
186 B
Ruby
9 lines
186 B
Ruby
class AttachmentUploader < GitlabUploader
|
|
include UploaderHelper
|
|
|
|
storage :file
|
|
|
|
def store_dir
|
|
"#{base_dir}/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
|
end
|
|
end
|