Sha256: 49ebd24695e865284939ba0caad7a9747ec8c4e837101b8852798876b8ef4cc6
Contents?: true
Size: 650 Bytes
Versions: 29
Compression:
Stored size: 650 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability class ProposalLinkedEvent < Decidim::Events::SimpleEvent i18n_attributes :proposal_title, :proposal_path def proposal_path @proposal_path ||= Decidim::ResourceLocatorPresenter.new(proposal).path end def proposal_title @proposal_title ||= translated_attribute(proposal.title) end def proposal @proposal ||= resource.linked_resources(:proposals, "included_proposals").find_by(id: extra[:proposal_id]) end def resource_text translated_attribute(resource.description) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems