Class: Decidim::Log::ValueTypes::ParticipatoryProcessTypePresenter
- Inherits:
-
DefaultPresenter
- Object
- DefaultPresenter
- Decidim::Log::ValueTypes::ParticipatoryProcessTypePresenter
- Defined in:
- decidim-participatory_processes/app/presenters/decidim/log/value_types/participatory_process_type_presenter.rb
Overview
This class presents the given value as a Decidim::ParticipatoryProcessType. If the type can be found, it shows its title. Otherwise it shows its ID.
Returns an HTML-safe String
Instance Method Summary collapse
Methods inherited from DefaultPresenter
Constructor Details
This class inherits a constructor from Decidim::Log::ValueTypes::DefaultPresenter
Instance Method Details
#present ⇒ Object
12 13 14 15 16 17 |
# File 'decidim-participatory_processes/app/presenters/decidim/log/value_types/participatory_process_type_presenter.rb', line 12 def present return unless value return h.translated_attribute(type.title) if type I18n.t("not_found", id: value, scope: "decidim.log.value_types.participatory_process_type_presenter") end |