Merge branch 'master' into notifications
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class CommentsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
before_action :authenticate_user!, only: :create
|
||||
before_action :load_commentable, only: :create
|
||||
before_action :build_comment, only: :create
|
||||
|
||||
@@ -15,6 +15,11 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@comment = Comment.find(params[:id])
|
||||
set_comment_flags(@comment.subtree)
|
||||
end
|
||||
|
||||
def vote
|
||||
@comment.vote_by(voter: current_user, vote: params[:value])
|
||||
respond_with @comment
|
||||
|
||||
Reference in New Issue
Block a user