Class: Decidim::Elections::ElectionPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Decidim::Elections::ElectionPresenter
- Includes:
- SanitizeHelper, TranslatableAttributes
- Defined in:
- app/presenters/decidim/elections/election_presenter.rb
Overview
Decorator for election
Instance Method Summary collapse
Instance Method Details
#description(strip_tags: false) ⇒ Object
21 22 23 24 25 |
# File 'app/presenters/decidim/elections/election_presenter.rb', line 21 def description(strip_tags: false) content = translated_attribute(election.description) content = (content) if content end |
#election ⇒ Object
12 13 14 |
# File 'app/presenters/decidim/elections/election_presenter.rb', line 12 def election __getobj__ end |
#title ⇒ Object
16 17 18 19 |
# File 'app/presenters/decidim/elections/election_presenter.rb', line 16 def title content = translated_attribute(election.title) decidim_html_escape(content) end |