Class: Decidim::Comments::TwoColumnsCommentsCell

Inherits:
CommentsCell
  • Object
show all
Defined in:
app/cells/decidim/comments/two_columns_comments_cell.rb

Overview

A cell to render comments in two columns layout.

Instance Method Summary collapse

Methods inherited from CommentsCell

#add_comment, #blocked_comments_warning, #comments_loading, #inline, #render_comments, #reply?, #single_comment_warning, #user_comments_blocked_warning

Instance Method Details

#callObject



7
8
9
10
11
# File 'app/cells/decidim/comments/two_columns_comments_cell.rb', line 7

def call
  initialize_comments
  @interleaved_comments = interleave_comments(@sorted_comments_in_favor, @sorted_comments_against)
  render :show
end

#render_column(top_comment, comments, icon_name, title) ⇒ Object



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

def render_column(top_comment, comments, icon_name, title)
  set_column_variables(top_comment, comments, icon_name, title)
  render :column
end