Class: Decidim::Comments::CommentMCell

Inherits:
Decidim::CardMCell
  • Object
show all
Includes:
CommentCellsHelper
Defined in:
app/cells/decidim/comments/comment_m_cell.rb

Overview

This cell renders the Medium (:m) comment card for an given instance of a Comment

Instance Method Summary collapse

Methods included from CommentCellsHelper

#renderable?, #resource_link_path, #resource_link_text, #root_commentable_title, #url_params

Instance Method Details

#commentObject



14
15
16
# File 'app/cells/decidim/comments/comment_m_cell.rb', line 14

def comment
  model
end

#descriptionObject



24
25
26
# File 'app/cells/decidim/comments/comment_m_cell.rb', line 24

def description
  strip_tags(model.formatted_body).truncate(200, separator: /\s/)
end

#has_header?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/cells/decidim/comments/comment_m_cell.rb', line 18

def has_header?
  false
end

#statusesObject



10
11
12
# File 'app/cells/decidim/comments/comment_m_cell.rb', line 10

def statuses
  []
end