Sha256: e243a4245be799e3226c75b0256512ebfc0c5d0a381590cc92195419520d96fb
Contents?: true
Size: 688 Bytes
Versions: 58
Compression:
Stored size: 688 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 def resource_text resource.body 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
58 entries across 58 versions & 1 rubygems