merge branch changeable-votes
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user