hotfix for polls without slugs

This commit is contained in:
rgarcia
2017-10-16 11:46:09 +02:00
committed by Javi Martín
parent 291ae7b734
commit 1af472b795
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ class PollsController < ApplicationController
private
def load_poll
@poll = Poll.find_by(slug: params[:id]) || Poll.find_by(id: params[:id])
@poll = Poll.where(slug: params[:id]).first || Poll.where(id: params[:id]).first
end
def load_active_poll