Skip to content

Commit

Permalink
Added pattern for specific actions in a modularized controller
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Dec 12, 2004
1 parent eb952e1 commit c33126e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions railties/lib/webrick_server.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def self.parse_uri(path)
{ :controller => $1, :action => $2 } { :controller => $1, :action => $2 }
when %r{^/#{component}/#{component}/$} then when %r{^/#{component}/#{component}/$} then
{ :module => $1, :controller => $2, :action => "index" } { :module => $1, :controller => $2, :action => "index" }
when %r{^/#{component}/#{component}/#{component}$} then
{ :module => $1, :controller => $2, :action => $3 }
when %r{^/#{component}/#{component}/#{id}$} then when %r{^/#{component}/#{component}/#{id}$} then
{ :controller => $1, :action => $2, :id => $3 } { :controller => $1, :action => $2, :id => $3 }
when %r{^/#{component}/#{component}/#{component}/#{id}$} then when %r{^/#{component}/#{component}/#{component}/#{id}$} then
Expand Down

0 comments on commit c33126e

Please sign in to comment.