aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-12-10 19:49:10 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-12-10 19:49:10 -0800
commit603e7f7ea507feb3cfea53c42b23be2b32dc240b (patch)
tree1ca5f6e5894c2cfa27a8c3c5ba453bafb05e4392 /guides/source
parent8dac9768b16c6cfaffa6c84abaaa7c4926020e0b (diff)
parentbaea5d69be52def2a81c31cd119f8dfcd2aa087b (diff)
downloadrails-603e7f7ea507feb3cfea53c42b23be2b32dc240b.tar.gz
rails-603e7f7ea507feb3cfea53c42b23be2b32dc240b.tar.bz2
rails-603e7f7ea507feb3cfea53c42b23be2b32dc240b.zip
Merge pull request #8468 from schneems/schneems/rack-index-page
Use Rails to Render Default Index Page
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/getting_started.md9
1 files changed, 2 insertions, 7 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index 54200768e6..02ec024e5b 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -215,11 +215,7 @@ Open the `app/views/welcome/index.html.erb` file in your text editor and edit it
### Setting the Application Home Page
-Now that we have made the controller and view, we need to tell Rails when we want Hello Rails! to show up. In our case, we want it to show up when we navigate to the root URL of our site, <http://localhost:3000>. At the moment, however, the "Welcome Aboard" smoke test is occupying that spot.
-
-To fix this, delete the `index.html` file located inside the `public` directory of the application.
-
-You need to do this because Rails will serve any static file in the `public` directory that matches a route in preference to any dynamic content you generate from the controllers. The `index.html` file is special: it will be served if a request comes in at the root route, e.g. <http://localhost:3000>. If another request such as <http://localhost:3000/welcome> happened, a static file at `public/welcome.html` would be served first, but only if it existed.
+Now that we have made the controller and view, we need to tell Rails when we want Hello Rails! to show up. In our case, we want it to show up when we navigate to the root URL of our site, <http://localhost:3000>. At the moment, "Welcome Aboard" is occupying that spot.
Next, you have to tell Rails where your actual home page is located.
@@ -233,7 +229,6 @@ Blog::Application.routes.draw do
# first created -> highest priority.
# ...
# You can have the root of your site routed with "root"
- # just remember to delete public/index.html.
# root to: "welcome#index"
```
@@ -558,7 +553,7 @@ parameter, which in our case will be the id of the post. Note that this
time we had to specify the actual mapping, `posts#show` because
otherwise Rails would not know which action to render.
-As we did before, we need to add the `show` action in
+As we did before, we need to add the `show` action in
`app/controllers/posts_controller.rb` and its respective view.
```ruby