Sha256: 8a2c976d495102bab2826f2b88c8f689fbe9e6427d5dc4850dbbe3afd011259c

Contents?: true

Size: 515 Bytes

Versions: 6

Compression:

Stored size: 515 Bytes

Contents

# frozen-string_literal: true

module Decidim
  module EnhancedTextwork
    class PublishParagraphEvent < 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.enhanced_textwork.paragraph_published_for_space"
      end

      def participatory_space_event?
        extra[:participatory_space]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-enhanced_textwork-1.0.5 app/events/decidim/enhanced_textwork/publish_paragraph_event.rb
decidim-enhanced_textwork-1.0.4 app/events/decidim/enhanced_textwork/publish_paragraph_event.rb
decidim-enhanced_textwork-1.0.3 app/events/decidim/enhanced_textwork/publish_paragraph_event.rb
decidim-enhanced_textwork-1.0.2 app/events/decidim/enhanced_textwork/publish_paragraph_event.rb
decidim-enhanced_textwork-1.0.1 app/events/decidim/enhanced_textwork/publish_paragraph_event.rb
decidim-enhanced_textwork-1.0.0 app/events/decidim/enhanced_textwork/publish_paragraph_event.rb