Class: Decidim::Log::ValueTypes::AssemblyTypePresenter
- Inherits:
-
DefaultPresenter
- Object
- DefaultPresenter
- Decidim::Log::ValueTypes::AssemblyTypePresenter
- Defined in:
- app/presenters/decidim/log/value_types/assembly_type_presenter.rb
Overview
This class presents the given value as a Decidim::AssembliesType. Check the ‘DefaultPresenter` for more info on how value presenters work.
Instance Method Summary collapse
-
#present ⇒ Object
Public: Presents the value as a Decidim::AssembliesType.
Instance Method Details
#present ⇒ Object
Public: Presents the value as a Decidim::AssembliesType. If the type can be found, it shows its title. Otherwise it shows its ID.
Returns an HTML-safe String.
14 15 16 17 18 19 |
# File 'app/presenters/decidim/log/value_types/assembly_type_presenter.rb', line 14 def present return unless value return h.translated_attribute(type.title) if type I18n.t("not_found", id: value, scope: "decidim.log.value_types.assembly_type_presenter") end |