Sha256: f9fa13f971b636a8dfa055054291c186c461556ec363c953d1b281e17bf25df2
Contents?: true
Size: 779 Bytes
Versions: 12
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true module Decidim module Comments # Custom helpers for comments cells. # module CommentCellsHelper def renderable? comment.present? && root_commentable.present? end def resource_link_text comment.formatted_body end def resource_link_path return root_commentable.polymorphic_resource_path(url_params) if root_commentable.respond_to?(:polymorphic_resource_path) resource_locator(root_commentable).path(url_params) end delegate :root_commentable, to: :comment def root_commentable_title decidim_html_escape(translated_attribute(root_commentable.title)) end def url_params { commentId: comment.id } end end end end
Version data entries
12 entries across 12 versions & 1 rubygems