aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-07-23 21:21:49 +0200
committerRobin Houston <robin.houston@gmail.com>2011-07-26 16:27:21 +0100
commitce2bd095d9c40e073f08f63102786ddb62203eac (patch)
tree7ca575709b836abab817a720c0fe5e1be29c1537
parent3a1114b0cbb0c95a9964a6b523fd11b83e213e47 (diff)
catch MissingSourceFile instead of NameError when including custom states, in order to handle the case when file is not present
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--app/models/info_request.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 441ddc417..81dffaa80 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -19,7 +19,7 @@ class RequestController < ApplicationController
include RequestControllerCustomStates
@@custom_states_loaded = true
end
- rescue NameError
+ rescue MissingSourceFile
end
def show
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