Module: Decidim::ParticipatoryProcesses::ApplicationHelper
- Includes:
- ResourceHelper, PaginateHelper
- Defined in:
- app/helpers/decidim/participatory_processes/application_helper.rb
Overview
Custom helpers, scoped to the participatory processes engine.
Instance Method Summary collapse
- #component_name ⇒ Object
- #render_rich_text(process, method) ⇒ Object
- #safe_content? ⇒ Boolean
- #safe_content_admin? ⇒ Boolean
Instance Method Details
#component_name ⇒ Object
11 12 13 |
# File 'app/helpers/decidim/participatory_processes/application_helper.rb', line 11 def component_name (defined?(current_component) && translated_attribute(current_component&.name).presence) || t("decidim.menu.processes") end |
#render_rich_text(process, method) ⇒ Object
23 24 25 26 27 |
# File 'app/helpers/decidim/participatory_processes/application_helper.rb', line 23 def render_rich_text(process, method) sanitized = render_sanitized_content(process, method, presenter_class: Decidim::ParticipatoryProcesses::ParticipatoryProcessPresenter) Decidim::ContentProcessor.render_without_format(sanitized).html_safe end |
#safe_content? ⇒ Boolean
15 16 17 |
# File 'app/helpers/decidim/participatory_processes/application_helper.rb', line 15 def safe_content? true end |
#safe_content_admin? ⇒ Boolean
19 20 21 |
# File 'app/helpers/decidim/participatory_processes/application_helper.rb', line 19 def safe_content_admin? true end |