Class: Dscf::Core::Document

Inherits:
ApplicationRecord show all
Defined in:
app/models/dscf/core/document.rb

Instance Method Summary collapse

Instance Method Details

#file_urlsObject



11
12
13
14
15
16
17
# File 'app/models/dscf/core/document.rb', line 11

def file_urls
  return [] unless files.attached?

  files.map do |file|
    Rails.application.routes.url_helpers.rails_blob_url(file, only_path: true)
  end
end