Sha256: 9b9f820f6bfa578c56cb36340f9a35c3fe46dd993b3c57654dc63a69e7c44f69
Contents?: true
Size: 470 Bytes
Versions: 13
Compression:
Stored size: 470 Bytes
Contents
# frozen_string_literal: true module Decidim # # Decorator for areas # class AreaPresenter < SimpleDelegator include Decidim::TranslationsHelper def translated_name @translated_name ||= translated_attribute name end 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 end end
Version data entries
13 entries across 13 versions & 1 rubygems