From ce2bd095d9c40e073f08f63102786ddb62203eac 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 dcef9e5b5..3d8069d67 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