mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reverting commit regarding public/index.html (no longer in Rails 4.)
This reverts commit f8461f73c7
.
This commit is contained in:
parent
a243f84b5d
commit
3dde99d01c
1 changed files with 0 additions and 2 deletions
|
@ -241,8 +241,6 @@ root to: "welcome#index"
|
|||
|
||||
The `root to: "welcome#index"` tells Rails to map requests to the root of the application to the welcome controller's index action and `get "welcome/index"` tells Rails to map requests to <http://localhost:3000/welcome/index> to the welcome controller's index action. This was created earlier when you ran the controller generator (`rails generate controller welcome index`).
|
||||
|
||||
You should also remove the `public/index.html` file because it might otherwise take precedence over the routes defined in `config/routes.rb`.
|
||||
|
||||
If you navigate to <http://localhost:3000> in your browser, you'll see the `Hello, Rails!` message you put into `app/views/welcome/index.html.erb`, indicating that this new route is indeed going to `WelcomeController`'s `index` action and is rendering the view correctly.
|
||||
|
||||
TIP: For more information about routing, refer to [Rails Routing from the Outside In](routing.html).
|
||||
|
|
Loading…
Reference in a new issue