Add comments to topics

This commit is contained in:
taitus
2017-08-07 15:05:36 +02:00
parent 7cf932490d
commit bea393bcde
8 changed files with 59 additions and 9 deletions

View File

@@ -1,8 +1,10 @@
class TopicsController < ApplicationController
# include CommentableActions
include CommentableActions
before_action :set_community
has_orders %w{most_voted newest oldest}, only: :show
skip_authorization_check
def new
@@ -21,6 +23,9 @@ class TopicsController < ApplicationController
def show
@topic = Topic.find(params[:id])
@commentable = @topic
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
set_comment_flags(@comment_tree.comments)
end
def edit