提交 3c03e7e2 编写于 作者: A Aaron Patterson

swtich to returning early if to responds to call

上级 ac9a3a9d
......@@ -237,9 +237,9 @@ def app
end
def default_controller_and_action
if to.respond_to?(:call)
{ }
else
hash = {}
return hash if to.respond_to? :call
controller = default_controller
action = default_action
......@@ -260,8 +260,6 @@ def default_controller_and_action
end
end
hash = {}
if controller.is_a? Regexp
hash[:controller] = controller
else
......@@ -278,7 +276,6 @@ def default_controller_and_action
hash
end
end
def check_action!(action)
unless action || segment_keys.include?(:action)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册