From 9c1a5847dedc22514873ecff886562cb70db2a4d Mon Sep 17 00:00:00 2001 From: kikito Date: Thu, 2 Feb 2017 16:53:57 +0100 Subject: [PATCH] uses answerable_by instead of current in voters controller --- app/controllers/officing/voters_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/officing/voters_controller.rb b/app/controllers/officing/voters_controller.rb index bb16a1412..dee1e00bd 100644 --- a/app/controllers/officing/voters_controller.rb +++ b/app/controllers/officing/voters_controller.rb @@ -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 \ No newline at end of file +end