Class: Decidim::Comments::CommentCell

Inherits:
ViewModel
  • Object
show all
Includes:
ActionView::Helpers::DateHelper, Cell::ViewModel::Partial, IconHelper, ResourceHelper
Defined in:
app/cells/decidim/comments/comment_cell.rb

Overview

A cell to display a single comment.

Instance Method Summary collapse

Instance Method Details

#alignment_badgeObject



24
25
26
27
28
# File 'app/cells/decidim/comments/comment_cell.rb', line 24

def alignment_badge
  return unless [-1, 1].include?(alignment)

  render :alignment_badge
end

#perform_caching?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'app/cells/decidim/comments/comment_cell.rb', line 36

def perform_caching?
  super && has_replies_in_children? == false
end

#votesObject



30
31
32
33
34
# File 'app/cells/decidim/comments/comment_cell.rb', line 30

def votes
  return unless root_commentable.comments_have_votes?

  render :votes
end