aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/routing_test.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2013-07-18 21:27:14 -0500
committerschneems <richard.schneeman@gmail.com>2013-07-20 14:56:10 -0500
commitb0caea29c2da9f4c8bb958019813482da297067d (patch)
tree6779ab9b0c8e6a86ca3b870ce6d3f203fab3bc03 /railties/test/application/routing_test.rb
parent6356d42093b10866f18d7bb21c442f1ccbd3c96c (diff)
downloadrails-b0caea29c2da9f4c8bb958019813482da297067d.tar.gz
rails-b0caea29c2da9f4c8bb958019813482da297067d.tar.bz2
rails-b0caea29c2da9f4c8bb958019813482da297067d.zip
Match Dev/Prod parity for Index Page
With Rails 4 the default index page was moved from a static file `index.html` inside the `public/` folder to an internal controller/view inside of the railties gem. This was to allow use of erb in the default index page and to remove the requirement that new apps must delete a static file to make their index pages work. While this was a good change, the functionality was unexpected to developers who wish to get their apps running in production ASAP. They will create a new app `rails new my app`, start a server to verify it works, then immediately deploy the app to verify that it can start working in production. Unfortunately locally they see a page when they visit `localhost:3000` when they visit their production app they get an error page. We initially anticipated this problem in the original pull request, but did not properly anticipate the severity or quantity of people who would like this functionality. Having a default index page serves as an excellent litmus test for a passed deploy on default apps, and it is very unexpected to have a page work locally, but not on production. This change makes the default index page available in production if the developer has not over-written it by defining their own `root` path inside of routes.
Diffstat (limited to 'railties/test/application/routing_test.rb')
-rw-r--r--railties/test/application/routing_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/test/application/routing_test.rb b/railties/test/application/routing_test.rb
index 1a4e2d4123..587d4dc87f 100644
--- a/railties/test/application/routing_test.rb
+++ b/railties/test/application/routing_test.rb
@@ -60,7 +60,7 @@ module ApplicationTests
test "rails/welcome in production" do
app("production")
get "/"
- assert_equal 404, last_response.status
+ assert_equal 200, last_response.status
end
test "rails/info/routes in production" do