Fix that routes werent being loaded in production environment

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@642 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 ead404cc
......@@ -237,7 +237,8 @@ def route(*args)
alias :connect :route
def reload
begin require_dependency(ROUTE_FILE)
begin
require_dependency(ROUTE_FILE) if Object.method_defined?(:require_dependency)
rescue LoadError, ScriptError => e
raise RoutingError, "Cannot load config/routes.rb:\n #{e.message}"
ensure # Ensure that there is at least one route:
......
......@@ -403,6 +403,13 @@ def test_action_dropped_when_controller_changes
@set.connect ':action/:controller'
verify_generate('index/resource', options)
end
def test_action_dropped_when_controller_given
@request.path_parameters = {:controller => 'content', :action => 'list'}
options = {:controller => 'content'}
@set.connect ':action/:controller'
verify_generate('index/content', options)
end
end
#require '../assertions/action_pack_assertions.rb'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册