Class: Decidim::AreaPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Decidim::AreaPresenter
- Includes:
- TranslationsHelper
- Defined in:
- app/presenters/decidim/area_presenter.rb
Overview
Decorator for areas
Instance Method Summary collapse
Methods included from TranslationsHelper
empty_translatable, ensure_translatable, multi_translation, translated_in_current_locale?
Methods included from TranslatableAttributes
Instance Method Details
#translated_name ⇒ Object
10 11 12 |
# File 'app/presenters/decidim/area_presenter.rb', line 10 def translated_name @translated_name ||= translated_attribute name end |
#translated_name_with_type ⇒ Object
14 15 16 17 18 |
# File 'app/presenters/decidim/area_presenter.rb', line 14 def translated_name_with_type translated_type_name = area_type.presence && AreaTypePresenter.new(area_type).translated_name [translated_type_name, translated_name].compact_blank.join(" - ") end |