Class: Decidim::ContentRenderers::ProposalRenderer
- Inherits:
-
ResourceRenderer
- Object
- BaseRenderer
- ResourceRenderer
- Decidim::ContentRenderers::ProposalRenderer
- Defined in:
- decidim-proposals/lib/decidim/content_renderers/proposal_renderer.rb
Overview
A renderer that searches Global IDs representing proposals in content and replaces it with a link to their show page.
e.g. gid://<APP_NAME>/Decidim::Proposals::Proposal/1
Instance Attribute Summary
Attributes inherited from BaseRenderer
Instance Method Summary collapse
Methods inherited from ResourceRenderer
Methods inherited from BaseRenderer
Methods included from Decidim::ContentProcessor::Common
#html_content?, #html_fragment
Constructor Details
This class inherits a constructor from Decidim::ContentRenderers::BaseRenderer
Instance Method Details
#regex ⇒ Object
12 13 14 |
# File 'decidim-proposals/lib/decidim/content_renderers/proposal_renderer.rb', line 12 def regex %r{gid://([\w-]*/Decidim::Proposals::Proposal/(\d+))}i end |