提交 defb4d08 编写于 作者: N Nicholas Seckar

Remove use of & logic operator. Closes #8114.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 0442f1ea
*SVN*
* Remove use of & logic operator. Closes #8114. [watson]
* Fixed JavaScriptHelper#escape_javascript to also escape closing tags #8023 [rubyruy]
* Fixed TextHelper#word_wrap for multiline strings with extra carrier returns #8663 [seth]
......
......@@ -980,7 +980,7 @@ def ensure_required_segments(segments)
warn "Route segment \"#{segment.to_s}\" cannot be optional because it precedes a required segment. This segment will be required."
end
segment.is_optional = false
elsif allow_optional & segment.respond_to?(:default) && segment.default
elsif allow_optional && segment.respond_to?(:default) && segment.default
# if a segment has a default, then it is optional
segment.is_optional = true
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册