From 614e14d815a6134c3dd8898e483a6cae5dcd9a2f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 24 Feb 2005 12:26:30 +0000 Subject: Drop the _doc nonsense and use the index.html straight on git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/rails_generator/generators/applications/app/app_generator.rb | 2 -- railties/lib/webrick_server.rb | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 26fd582c88..347140358b 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -67,7 +67,6 @@ class AppGenerator < Rails::Generator::Base end # Docs - m.template "doc/index.html", "public/_doc/index.html" m.file "doc/README_FOR_APP", "doc/README_FOR_APP" # Logs @@ -107,7 +106,6 @@ class AppGenerator < Rails::Generator::Base doc lib log - public/_doc public/images public/javascripts public/stylesheets diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 9357c75e71..26445e403b 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -59,11 +59,11 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet end def add_dot_html(req) - if /^([^.]+)$/ =~ req.path then req.instance_variable_set(:@path_info, "#{$1}.html") end + if /^([^.]+)$/ =~ req.path && req.path != "/" then req.instance_variable_set(:@path_info, "#{$1}.html") end end def remove_dot_html(req) - if /^([^.]+).html$/ =~ req.path then req.instance_variable_set(:@path_info, $1) end + if /^([^.]+).html$/ =~ req.path && req.path != "/" then req.instance_variable_set(:@path_info, $1) end end def handle_dispatch(req, res, origin = nil) -- cgit v1.2.3