aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-12 20:37:43 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-12 20:37:43 +0000
commit65a9011ea3577f19055d653ff6bb16a62ae1a9dd (patch)
treeddb9ce6964b0f0bfcaa76f2b6fcb90ba7393da42 /railties
parent8eec6741487bbc2199742f711974399bb937ce16 (diff)
downloadrails-65a9011ea3577f19055d653ff6bb16a62ae1a9dd.tar.gz
rails-65a9011ea3577f19055d653ff6bb16a62ae1a9dd.tar.bz2
rails-65a9011ea3577f19055d653ff6bb16a62ae1a9dd.zip
Fixed a pattern for module loading
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/webrick_server.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb
index 3262fc505b..eee0bd90c2 100644
--- a/railties/lib/webrick_server.rb
+++ b/railties/lib/webrick_server.rb
@@ -130,12 +130,13 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
{ :controller => $1, :action => "index" }
when %r{^/#{component}/#{component}$} then
{ :controller => $1, :action => $2 }
+ when %r{^/#{component}/#{component}/#{id}$} then
+ { :controller => $1, :action => $2, :id => $3 }
+
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
{ :module => $1, :controller => $2, :action => $3, :id => $4 }
else