提交 1f870a2c 编写于 作者: A Aaron Patterson

issue a warning when we cannot construct a controller

上级 f79b29a5
......@@ -529,11 +529,19 @@ def setup_controller_request_and_response
@response = TestResponse.new
@response.request = @request
@controller = nil unless defined? @controller
if klass = self.class.controller_class
@controller ||= klass.new rescue nil
unless @controller
begin
@controller = klass.new
rescue
warn "could not construct controller #{klass}" if $VERBOSE
end
end
end
if defined?(@controller) && @controller
if @controller
@controller.request = @request
@controller.params = {}
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册