Add comments to topics
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user