Sha256: 1ff86a4d4b81fe7a0086805e7af27eeec8b1bd17711e99f338ff332c8f98eade
Contents?: true
Size: 812 Bytes
Versions: 8
Compression:
Stored size: 812 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, anchor: "comment_#{comment.id}" } end end end end
Version data entries
8 entries across 8 versions & 1 rubygems