提交 0b987042 编写于 作者: A Aaron Patterson

simplify conditionals by assuming hash values will never be `false`

上级 7868cf8a
......@@ -224,19 +224,11 @@ def to
end
def default_controller
if @options[:controller]
@options[:controller]
elsif @scope[:controller]
@scope[:controller]
end
@options[:controller] || @scope[:controller]
end
def default_action
if @options[:action]
@options[:action]
elsif @scope[:action]
@scope[:action]
end
@options[:action] || @scope[:action]
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册