Sha256: 6485d8fcff7ddfd3133f72c13be9ecd983e086e96df2277f0233575d7997bd5a
Contents?: true
Size: 546 Bytes
Versions: 2
Compression:
Stored size: 546 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 ||= proposal.title end def proposal @proposal ||= resource.linked_resources(:proposals, "included_proposals").where(id: extra[:proposal_id]).first end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
decidim-accountability-0.10.1 | app/events/decidim/accountability/proposal_linked_event.rb |
decidim-accountability-0.10.0 | app/events/decidim/accountability/proposal_linked_event.rb |