This commit is contained in:
@@ -7,4 +7,8 @@ class WikiAsset < ApplicationRecord
|
||||
has_one_attached :file
|
||||
|
||||
validates :file, presence: true
|
||||
|
||||
def url
|
||||
Rails.application.routes.url_helpers.rails_blob_url(file, only_path: true)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user