Sha256: e7e4b4bfc480dc07a4a1d86af62fbcd144a7776116baca77f53768032a8c026c

Contents?: true

Size: 498 Bytes

Versions: 13

Compression:

Stored size: 498 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[:participatory_space]
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-proposals-0.25.2 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.25.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.25.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.25.0.rc4 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.25.0.rc3 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.25.0.rc2 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.25.0.rc1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.24.3 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.24.2 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.24.1 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.24.0 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.24.0.rc2 app/events/decidim/proposals/publish_proposal_event.rb
decidim-proposals-0.24.0.rc1 app/events/decidim/proposals/publish_proposal_event.rb