Comments in legislation question page

This commit is contained in:
Amaia Castro
2016-12-22 23:00:37 +01:00
parent b2aa83ae4d
commit 55eb03531c
12 changed files with 59 additions and 14 deletions

View File

@@ -2,6 +2,11 @@ class Legislation::QuestionsController < Legislation::BaseController
load_and_authorize_resource :process
load_and_authorize_resource :question, through: :process
has_orders %w{most_voted newest oldest}, only: :show
def show
@commentable = @question
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
set_comment_flags(@comment_tree.comments)
end
end