From 40979d7966fd148ab73a5c9d1a68c6b57d8f9756 Mon Sep 17 00:00:00 2001 From: David Cabo Date: Sat, 23 Jul 2011 21:21:49 +0200 Subject: catch MissingSourceFile instead of NameError when including custom states, in order to handle the case when file is not present --- app/models/info_request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/info_request.rb') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 582e7aab9..9182b6ae7 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -112,7 +112,7 @@ class InfoRequest < ActiveRecord::Base include InfoRequestCustomStates @@custom_states_loaded = true end - rescue NameError + rescue MissingSourceFile end # only check on create, so existing models with mixed case are allowed -- cgit v1.2.3