Class: Decidim::Assemblies::AssemblyPresenter

Inherits:
SimpleDelegator
  • Object
show all
Includes:
ActionView::Helpers::UrlHelper
Defined in:
decidim-assemblies/app/presenters/decidim/assemblies/assembly_presenter.rb

Instance Method Summary collapse

Instance Method Details

#assemblyObject


24
25
26
# File 'decidim-assemblies/app/presenters/decidim/assemblies/assembly_presenter.rb', line 24

def assembly
  __getobj__
end

18
19
20
21
22
# File 'decidim-assemblies/app/presenters/decidim/assemblies/assembly_presenter.rb', line 18

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

#hero_image_urlObject


12
13
14
15
16
# File 'decidim-assemblies/app/presenters/decidim/assemblies/assembly_presenter.rb', line 12

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