Sha256: 31a1a6a19f7cfd806f208879ccb1625678b54f3ff244d2680ae1cf66ef656617

Contents?: true

Size: 502 Bytes

Versions: 21

Compression:

Stored size: 502 Bytes

Contents

# frozen-string_literal: true

module Decidim
  module Proposals
    class PublishProposalEvent < Decidim::Events::SimpleEvent
      include Decidim::Events::CoauthorEvent

      def resource_text
        resource.body
      end

      private

      def i18n_scope
        return super unless participatory_space_event?

        "decidim.events.proposals.proposal_published_for_space"
      end

      def participatory_space_event?
        extra.dig(:participatory_space)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
decidim-proposals-0.23.6 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.5 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.4 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.3 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.2 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.1.rc1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.23.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.22.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.21.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.20.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.20.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.19.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.18.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.19.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.17.2 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.18.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.17.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.16.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.17.0 app/events/decidim/proposals/publish_proposal_event.rb