partial fix for #1263 (posts)

This commit is contained in:
Toks
2013-06-29 12:40:51 -04:00
parent b4ffd10357
commit 9bffc081e4
7 changed files with 39 additions and 1 deletions

View File

@@ -82,6 +82,13 @@ class PostsController < ApplicationController
render :nothing => true
end
def unvote
@post = Post.find(params[:id])
@post.unvote!
rescue PostVote::Error => x
@error = x
end
private
def tag_query
params[:tags] || (params[:post] && params[:post][:tags])