From 65a9011ea3577f19055d653ff6bb16a62ae1a9dd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 12 Dec 2004 20:37:43 +0000 Subject: Fixed a pattern for module loading git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/webrick_server.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'railties/lib') 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 -- cgit v1.2.3