From 3402575fbda5e254a03058b4eeadf4710b452ffd Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 6 Feb 2017 20:04:48 +0000 Subject: [PATCH] Oops, make sure we don't infinite loop :) --- app/controllers/main_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index f10ec13a..75d2f491 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -27,6 +27,7 @@ class MainController < ApplicationController raise RetryMe if @question.nil? || @question[:question].nil? # :( rescue RetryMe + attempts += 1 retry if attempts < 5 end end