Sha256: 54ad72152e1981c7e9673e4c25e17dcad0a012eb3f45249cf70a6f727701582e
Contents?: true
Size: 744 Bytes
Versions: 31
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true module Decidim # # Decorator for conference speakers # class ConferenceSpeakerPresenter < SimpleDelegator include Decidim::ResourceHelper delegate :profile_path, to: :user, allow_nil: true def name user ? user.name : full_name end def nickname user.nickname if user end def deleted? user ? user.deleted? : false end def badge user ? user.badge : false end def can_be_contacted? user ? true : false end def has_tooltip? false end private def user @user ||= begin if (user = __getobj__.user.presence) Decidim::UserPresenter.new(user) end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems