fixes #58: Unauthenticated users can vote infinitely on posts
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
class PostVotesController < ApplicationController
|
class PostVotesController < ApplicationController
|
||||||
|
before_filter :member_only
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@post = Post.find(params[:post_id])
|
@post = Post.find(params[:post_id])
|
||||||
@post.vote!(params[:score])
|
@post.vote!(params[:score])
|
||||||
|
|||||||
Reference in New Issue
Block a user