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

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

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