expose voting to non-gold supervoters

This commit is contained in:
r888888888
2016-03-14 16:52:49 -07:00
parent 51e77dbb9c
commit 6d6d00b190
6 changed files with 33 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
class PostVotesController < ApplicationController
before_filter :gold_only
before_filter :voter_only
def create
@post = Post.find(params[:post_id])
@@ -7,4 +7,10 @@ class PostVotesController < ApplicationController
rescue PostVote::Error => x
@error = x
end
protected
def voter_only
CurrentUser.is_voter?
end
end