Sha256: 15faf1a2089a6319ce30bba2ef9a41de9095a868df06ed5d4dc939e772e941ef
Contents?: true
Size: 631 Bytes
Versions: 19
Compression:
Stored size: 631 Bytes
Contents
# frozen-string_literal: true module Decidim module Proposals class ProposalEndorsedEvent < Decidim::Events::SimpleEvent i18n_attributes :endorser_nickname, :endorser_name, :endorser_path, :nickname delegate :nickname, :name, to: :endorser, prefix: true def nickname endorser_nickname end def endorser_path endorser.profile_path end private def endorser @endorser ||= Decidim::UserPresenter.new(endorser_user) end def endorser_user @endorser_user ||= Decidim::User.find_by(id: extra[:endorser_id]) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems