Sha256: 74d56855c472de371cbc4fc341334bce3d27a43777519c90b206695d58dcd342
Contents?: true
Size: 752 Bytes
Versions: 14
Compression:
Stored size: 752 Bytes
Contents
# frozen_string_literal: true module Decidim module Assemblies class AssemblyPresenter < 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 return if assembly.hero_image.blank? URI.join(decidim.root_url(host: assembly.organization.host), assembly.hero_image_url).to_s end def banner_image_url return if assembly.banner_image.blank? URI.join(decidim.root_url(host: assembly.organization.host), assembly.banner_image_url).to_s end def assembly __getobj__ end end end end
Version data entries
14 entries across 14 versions & 1 rubygems