fixes #2838
This commit is contained in:
@@ -13,7 +13,7 @@ class CommentVotesController < ApplicationController
|
||||
|
||||
def destroy
|
||||
@comment = Comment.find(params[:comment_id])
|
||||
@comment.unvote!(params[:score])
|
||||
@comment.unvote!
|
||||
rescue CommentVote::Error => x
|
||||
@error = x
|
||||
render status: 500
|
||||
|
||||
@@ -70,13 +70,6 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def unvote
|
||||
@comment = Comment.find(params[:id])
|
||||
@comment.unvote!
|
||||
rescue CommentVote::Error => x
|
||||
@error = x
|
||||
end
|
||||
|
||||
private
|
||||
def index_for_post
|
||||
@post = Post.find(params[:post_id])
|
||||
|
||||
@@ -83,13 +83,6 @@ class PostsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def unvote
|
||||
@post = Post.find(params[:id])
|
||||
@post.unvote!
|
||||
rescue PostVote::Error => x
|
||||
@error = x
|
||||
end
|
||||
|
||||
def home
|
||||
if CurrentUser.user.is_anonymous?
|
||||
redirect_to intro_explore_posts_path
|
||||
|
||||
Reference in New Issue
Block a user