Class: Decidim::Votings::VotingPresenter

Inherits:
SimpleDelegator
  • Object
show all
Includes:
SanitizeHelper, TranslatableAttributes
Defined in:
decidim-elections/app/presenters/decidim/votings/voting_presenter.rb

Instance Method Summary collapse

Methods included from TranslatableAttributes

#default_locale?

Methods included from SanitizeHelper

#decidim_html_escape, #decidim_sanitize, #decidim_sanitize_editor, #decidim_sanitize_newsletter, #decidim_url_escape, included

Instance Method Details


18
19
20
# File 'decidim-elections/app/presenters/decidim/votings/voting_presenter.rb', line 18

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

#introductory_image_urlObject


14
15
16
# File 'decidim-elections/app/presenters/decidim/votings/voting_presenter.rb', line 14

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

#titleObject


9
10
11
12
# File 'decidim-elections/app/presenters/decidim/votings/voting_presenter.rb', line 9

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

#votingObject


22
23
24
# File 'decidim-elections/app/presenters/decidim/votings/voting_presenter.rb', line 22

def voting
  __getobj__
end