提交 f434fa84 编写于 作者: C coreyhaines

Left off a : when specifying the :namespace option for a :controller

path segment
上级 4b89b90e
......@@ -389,7 +389,7 @@ match ':controller/:action/:id/:user_id'
An incoming path of +/photos/show/1/2+ will be dispatched to the +show+ action of the +PhotosController+. +params[:id]+ will be +"1"+, and +params[:user_id]+ will be +"2"+.
NOTE: You can't use +namespace+ or +:module+ with a +:controller+ path segment. If you need to do this then use a constraint on :controller that matches the namespace you require. e.g:
NOTE: You can't use +:namespace+ or +:module+ with a +:controller+ path segment. If you need to do this then use a constraint on :controller that matches the namespace you require. e.g:
<ruby>
match ':controller(/:action(/:id))', :controller => /admin\/[^\/]+/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册