aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
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