Sha256: 93487786ddb6735b5f7c6d24d81008603707d742f62231d6d89fa63e4359bd5a
Contents?: true
Size: 701 Bytes
Versions: 28
Compression:
Stored size: 701 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability class ResultProgressUpdatedEvent < Decidim::Events::SimpleEvent i18n_attributes :proposal_title, :proposal_path, :progress 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").find_by(id: extra[:proposal_id]) end def progress extra[:progress] end def resource_text translated_attribute(resource.description) end end end end
Version data entries
28 entries across 28 versions & 1 rubygems