1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05: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:
David Heinemeier Hansson 2005-02-17 19:20:44 +00:00
parent 0e764a5599
commit ea3faf3df9

View file

@ -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: