Sha256: 2bff6cf7ac4bc227310883609ad8623d24607afbd26202b38502067fe54f0c71

Contents?: true

Size: 486 Bytes

Versions: 33

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ContentRenderers
    # A renderer that searches Global IDs representing meetings in content
    # and replaces it with a link to their show page.
    #
    # e.g. gid://<APP_NAME>/Decidim::Meetings::Meeting/1
    #
    # @see BaseRenderer Examples of how to use a content renderer
    class MeetingRenderer < ResourceRenderer
      def regex
        %r{gid://([\w-]*/Decidim::Meetings::Meeting/(\d+))}i
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
decidim-meetings-0.26.8 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.4 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.3 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.26.7 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.26.5 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.2 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.1 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.26.4 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.0 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.26.3 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.0.rc2 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.27.0.rc1 lib/decidim/content_renderers/meeting_renderer.rb
decidim-meetings-0.26.2 lib/decidim/content_renderers/meeting_renderer.rb