expose voting to non-gold supervoters
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user