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

Ensure that request.path never returns nil. Closes #1675

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 27962ead
*SVN*
* Ensure that request.path never returns nil. Closes #1675 [Nicholas Seckar]
* Add ability to specify Route Regexps for controllers. Closes #1917. [Sebastian Kanthak]
* Provide Named Route's hash methods as helper methods. Closes #1744. [Nicholas Seckar, Steve Purcell]
......
......@@ -158,12 +158,10 @@ def path
path = (uri = request_uri) ? uri.split('?').first : ''
# Cut off the path to the installation directory if given
if root = relative_url_root
path[root.length..-1]
else
path
end
end
root = relative_url_root
path[0, root.length] = '' if root
path || ''
end
# Returns the path minus the web server relative installation directory.
# This method returns nil unless the web server is apache.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册