Sha256: ba273fc7a1bb0d757c743444855fd565a8ebb9757f3d1f7cb7b2e923a34e0bf1
Contents?: true
Size: 603 Bytes
Versions: 52
Compression:
Stored size: 603 Bytes
Contents
# frozen_string_literal: true module Decidim module Elections # # Decorator for election # class ElectionPresenter < SimpleDelegator include Decidim::SanitizeHelper include Decidim::TranslatableAttributes def election __getobj__ end def title content = translated_attribute(election.title) decidim_html_escape(content) end def description(strip_tags: false) content = translated_attribute(election.description) content = strip_tags(content) if strip_tags content end end end end
Version data entries
52 entries across 52 versions & 1 rubygems