Sha256: 9857b59cda12de2fad46a9ebc5eab36c0ff0168ae335d74fb9291e754d11f1cb

Contents?: true

Size: 677 Bytes

Versions: 12

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    class ParticipatoryProcessPresenter < SimpleDelegator
      include Rails.application.routes.mounted_helpers
      include ActionView::Helpers::UrlHelper

      delegate :url, to: :hero_image, prefix: true
      delegate :url, to: :banner_image, prefix: true

      def hero_image_url
        URI.join(decidim.root_url(host: process.organization.host), process.hero_image_url).to_s
      end

      def banner_image_url
        URI.join(decidim.root_url(host: process.organization.host), process.banner_image_url).to_s
      end

      def process
        __getobj__
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.24.0.rc2 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.23.4 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.24.0.rc1 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.23.3 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.23.2 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.23.1 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.23.1.rc1 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.23.0 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.22.0 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.21.0 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.20.1 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
decidim-participatory_processes-0.20.0 app/presenters/decidim/participatory_processes/participatory_process_presenter.rb