mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user