Class: Decidim::AttachmentPresenter

Inherits:
SimpleDelegator
  • Object
show all
Includes:
ActionView::Helpers::UrlHelper
Defined in:
decidim-core/app/presenters/decidim/attachment_presenter.rb

Overview

Decorator for attachments

Instance Method Summary collapse

Instance Method Details

#attachmentObject


17
18
19
# File 'decidim-core/app/presenters/decidim/attachment_presenter.rb', line 17

def attachment
  __getobj__
end

#attachment_file_urlObject


13
14
15
# File 'decidim-core/app/presenters/decidim/attachment_presenter.rb', line 13

def attachment_file_url
  URI.join(decidim.root_url(host: attachment.attached_to.organization.host), attachment.file_url).to_s
end