From 3a111122f55b67c57d05e5d3b0f18cea0fd769fd Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 14 Sep 2011 13:20:47 -0400 Subject: [PATCH] fixes #58: Unauthenticated users can vote infinitely on posts --- app/controllers/post_votes_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/post_votes_controller.rb b/app/controllers/post_votes_controller.rb index a8e407f06..12b64ca4b 100644 --- a/app/controllers/post_votes_controller.rb +++ b/app/controllers/post_votes_controller.rb @@ -1,4 +1,6 @@ class PostVotesController < ApplicationController + before_filter :member_only + def create @post = Post.find(params[:post_id]) @post.vote!(params[:score])