Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Match Dev/Prod parity for Index Page"

Showing welcome page in production can expose information, which should
not be visible on production if people don't override the default root
route.

This reverts commit b0caea2.
  • Loading branch information...
commit 73bbf548687a3502cc87aaea4484943e65dce053 1 parent 782d2f6
@drogus drogus authored
View
4 railties/lib/rails/application/finisher.rb
@@ -25,11 +25,9 @@ module Finisher
get '/rails/info/properties' => "rails/info#properties"
get '/rails/info/routes' => "rails/info#routes"
get '/rails/info' => "rails/info#index"
+ get '/' => "rails/welcome#index"
end
end
- app.routes.append do
- get '/' => "rails/welcome#index"
- end
end
initializer :build_middleware_stack do
View
2  railties/lib/rails/templates/rails/welcome/index.html.erb
@@ -227,7 +227,7 @@
<li>
<h2>Set up a root route to replace this page</h2>
- <p>You're seeing this page because you haven't set a root route yet.</p>
+ <p>You're seeing this page because you're running in development mode and you haven't set a root route yet.</p>
<p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
</li>
View
2  railties/test/application/routing_test.rb
@@ -60,7 +60,7 @@ def index
test "rails/welcome in production" do
app("production")
get "/"
- assert_equal 200, last_response.status
+ assert_equal 404, last_response.status
end
test "rails/info/routes in production" do

1 comment on commit 73bbf54

Please sign in to comment.
Something went wrong with that request. Please try again.