merge branch changeable-votes

This commit is contained in:
Toks
2013-06-29 15:12:38 -04:00
15 changed files with 124 additions and 18 deletions

View File

@@ -86,6 +86,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])