Module: Crm::LinkChecksHelper
- Defined in:
- app/helpers/crm/link_checks_helper.rb
Overview
View helpers for rendering link-check results in the CRM.
Instance Method Summary collapse
-
#link_check_article_links(link_check) ⇒ Array<String>
Builds one link (or a plain label when no path resolves) per article attached to a link check.
Instance Method Details
#link_check_article_links(link_check) ⇒ Array<String>
Builds one link (or a plain label when no path resolves) per article
attached to a link check.
12 13 14 15 16 17 18 |
# File 'app/helpers/crm/link_checks_helper.rb', line 12 def link_check_article_links(link_check) link_check.articles.map do |article| path = polymorphic_article_path(article) label = "#{article.article_type_human}: #{article.subject}" path ? link_to(label, path) : content_tag(:span, label, class: 'text-body-secondary') end end |