Skip to content

Commit

Permalink
Briefly explain static file routing in the getting started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed May 13, 2012
1 parent 16301cc commit e6e6f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/getting_started.textile
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Now that we have made the controller and view, we need to tell Rails when we wan

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.
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 <filename>public/welcome.html</filename> would be served first, but only if it existed.

Next, you have to tell Rails where your actual home page is located.

Expand Down

0 comments on commit e6e6f4e

Please sign in to comment.