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