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.29.1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.4 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.9 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.29.0 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.3 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.8 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.29.0.rc4 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.29.0.rc3 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.29.0.rc2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.29.0.rc1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.2 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.7 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.1 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.6 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.10 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.26.9 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.0 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.27.5 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.0.rc5 app/presenters/decidim/attachment_presenter.rb
decidim-core-0.28.0.rc4 app/presenters/decidim/attachment_presenter.rb