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:
parent
0e764a5599
commit
ea3faf3df9
1 changed files with 1 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue