Added pattern for specific actions in a modularized controller

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2004-12-12 17:23:20 +00:00
parent eb952e1e94
commit c33126e07c
1 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,8 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
{ :controller => $1, :action => $2 }
when %r{^/#{component}/#{component}/$} then
{ :module => $1, :controller => $2, :action => "index" }
when %r{^/#{component}/#{component}/#{component}$} then
{ :module => $1, :controller => $2, :action => $3 }
when %r{^/#{component}/#{component}/#{id}$} then
{ :controller => $1, :action => $2, :id => $3 }
when %r{^/#{component}/#{component}/#{component}/#{id}$} then