diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2012-05-14 06:52:50 +1000 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2012-05-14 06:52:50 +1000 |
commit | e6e6f4ef8675ea001801362b42cdabb13801da67 (patch) | |
tree | 502970d6f1193669ed59f482396b5473278de9af /guides | |
parent | 16301cce760ad98c6dc07c53f67c990fd5d684b4 (diff) | |
download | rails-e6e6f4ef8675ea001801362b42cdabb13801da67.tar.gz rails-e6e6f4ef8675ea001801362b42cdabb13801da67.tar.bz2 rails-e6e6f4ef8675ea001801362b42cdabb13801da67.zip |
Briefly explain static file routing in the getting started guide
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/getting_started.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index 1e9bd1f144..bdd385918f 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -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. |