From 169c587e42cf2acd0e223232e48d50ea4157784f Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 7 Jul 2015 12:27:13 -0400 Subject: [PATCH] 1-second timeout on bulk modeling --- app/controllers/pets_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/pets_controller.rb b/app/controllers/pets_controller.rb index 01fb67d5..5a92e031 100644 --- a/app/controllers/pets_controller.rb +++ b/app/controllers/pets_controller.rb @@ -13,7 +13,11 @@ class PetsController < ApplicationController redirect_to roulette_path else raise Pet::PetNotFound unless params[:name] - @pet = Pet.load(params[:name], :item_scope => Item.includes(:translations)) + @pet = Pet.load( + params[:name], + :item_scope => Item.includes(:translations), + :timeout => 1 + ) points = contribute(current_user, @pet) respond_to do |format|