Sha256: aeb00862a356595db5e6888efbbe12ee81205156641fbd773a9304e9484cde13

Contents?: true

Size: 629 Bytes

Versions: 38

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    class VotingPresenter < SimpleDelegator
      include Decidim::SanitizeHelper
      include Decidim::TranslatableAttributes

      def title
        content = translated_attribute(voting.title)
        decidim_html_escape(content)
      end

      def introductory_image_url
        voting.attached_uploader(:introductory_image).url(host: voting.organization.host)
      end

      def banner_image_url
        voting.attached_uploader(:banner_image).url(host: voting.organization.host)
      end

      def voting
        __getobj__
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.9 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.28.3 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.8 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.28.2 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.7 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.28.1 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.6 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.26.10 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.26.9 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.28.0 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.5 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.28.0.rc5 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.28.0.rc4 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.26.8 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.4 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.3 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.26.7 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.26.5 app/presenters/decidim/votings/voting_presenter.rb
decidim-elections-0.27.2 app/presenters/decidim/votings/voting_presenter.rb