Sha256: e436ea630c5c0f3b346661059e07ee7518ee86763dddd61fc805ccc5e0b39922

Contents?: true

Size: 556 Bytes

Versions: 18

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

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

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

      def hero_image_url
        return if process_group.blank?

        URI.join(decidim.root_url(host: process_group.organization.host), process_group.try(:hero_image_url)).to_s
      end

      def process_group
        __getobj__
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.24.3 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.6 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.24.2 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.5 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.24.1 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.24.0 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.24.0.rc2 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.4 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.24.0.rc1 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.3 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.2 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.1 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.1.rc1 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.23.0 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.22.0 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.21.0 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.20.1 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb
decidim-participatory_processes-0.20.0 app/presenters/decidim/participatory_processes/participatory_process_group_presenter.rb