Skip to content

Commit 5a43c46

Browse files
committed
Serve public documents from /public/docs/ directory
1 parent 3c3d614 commit 5a43c46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3
-3
lines changed

app/models/document.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Document
22
attr_reader :id, :filename
3-
DIR_PATH = 'db/docs'
4-
URL_PATH = 'docs'
3+
DIR_PATH = 'public/docs'
4+
URL_PATH = '/docs'
55

66
class << self
77
def all
@@ -52,7 +52,7 @@ def updated_at
5252
end
5353

5454
def url
55-
"/#{URL_PATH}/#{self.filename}"
55+
"#{URL_PATH}/#{self.filename}"
5656
end
5757

5858
def exists?

0 commit comments

Comments
 (0)