From ea3faf3df9c13b8e4b0a6553da676099e92abc4f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 17 Feb 2005 19:20:44 +0000 Subject: Only load ROUTE_FILE if one has been declared git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@651 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/routing.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller/routing.rb') diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 2633eff09c..84dd29e8eb 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -238,9 +238,7 @@ module ActionController def reload begin - require_dependency(ROUTE_FILE) - rescue NoMethodError - # ignore for unit tests + require_dependency(ROUTE_FILE) if ROUTE_FILE rescue LoadError, ScriptError => e raise RoutingError, "Cannot load config/routes.rb:\n #{e.message}" ensure # Ensure that there is at least one route: -- cgit v1.2.3