Skip to content

Commit 26613a7

Browse files
committed
change uploaded documents store dir
1 parent 12392dd commit 26613a7

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

app/controllers/uploads_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ class UploadsController < ApplicationController
66
rescue_from CanCan::AccessDenied, with: :log_and_raise_not_found_exception
77

88
MODELS_OVERRIDES = {
9-
"operator_document_file" => "document_file",
10-
"documents" => "uploaded_document"
9+
"operator_document_file" => "document_file"
1110
}.freeze
1211

1312
def download

app/uploaders/document_uploader.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# frozen_string_literal: true
22

33
class DocumentUploader < ApplicationUploader
4-
def store_dir
5-
"uploads/documents/#{model.id}"
6-
end
7-
84
def extension_allowlist
95
%w[pdf doc docx txt csv xml jpg jpeg png exif tiff bmp]
106
end

0 commit comments

Comments
 (0)