uses answerable_by instead of current in voters controller

This commit is contained in:
kikito
2017-02-02 16:53:57 +01:00
parent 86d42ce094
commit 9c1a5847de

View File

@@ -3,7 +3,7 @@ class Officing::VotersController < Officing::BaseController
def new
@user = User.find(params[:id])
@polls = Poll.current # fix and use answerable_by(@user)
@polls = Poll.answerable_by(@user)
end
def create
@@ -22,4 +22,4 @@ class Officing::VotersController < Officing::BaseController
params.require(:voter).permit(:poll_id, :user_id)
end
end
end