Sha256: 09faf281ed85e6283ff7d0866e474bd8a199c26b5099acc68063b36953bf3834

Contents?: true

Size: 304 Bytes

Versions: 44

Compression:

Stored size: 304 Bytes

Contents

# frozen_string_literal: true

module Decidim
  #
  # Decorator for attachments
  #
  class AttachmentPresenter < SimpleDelegator
    def attachment_file_url
      attachment.attached_uploader(:file).url(host: attached_to.organization.host)
    end

    def attachment
      __getobj__
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
decidim-core-0.26.8 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.4 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.3 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.7 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.5 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.4 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.0 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.3 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.0.rc2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.0.rc1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.0 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.0.rc2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.0.rc1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.25.2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.25.1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.25.0 app/presenters/decidim/attachment_presenter.rb