diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 18ca97bf8..78b11d321 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -43,7 +43,7 @@ class PollsController < ApplicationController private def load_poll - @poll = Poll.find_by(slug: params[:id]) || Poll.find_by(id: params[:id]) + @poll = Poll.find_by_slug_or_id!(params[:id]) end def load_active_poll