Class: Decidim::Comments::CommentCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::Comments::CommentCell
- Includes:
- Cell::ViewModel::Partial, ResourceHelper, UserRoleChecker
- 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_badge ⇒ Object
23 24 25 26 27 |
# File 'app/cells/decidim/comments/comment_cell.rb', line 23 def alignment_badge return unless [-1, 1].include?(alignment) render :alignment_badge end |
#perform_caching? ⇒ Boolean
35 36 37 |
# File 'app/cells/decidim/comments/comment_cell.rb', line 35 def perform_caching? super && has_replies_in_children? == false && current_user.blank? end |
#votes ⇒ Object
29 30 31 32 33 |
# File 'app/cells/decidim/comments/comment_cell.rb', line 29 def votes return unless root_commentable.comments_have_votes? render :votes end |