diff options
author | Xavier Noria <fxn@hashref.com> | 2011-06-23 18:08:11 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-06-23 18:08:11 +0200 |
commit | 1f505a8ef21a300c22e4c6a3cc4d3bf4cf1853de (patch) | |
tree | e6d3457116b06dac44554b4100ff2ddfd13a64ee /railties/guides/source/getting_started.textile | |
parent | d49622a1f211a036283dcd094c9da0da3bb39fa8 (diff) | |
parent | 06fe01a337ccf7f44bbaf272eddac284f80dcadb (diff) | |
download | rails-1f505a8ef21a300c22e4c6a3cc4d3bf4cf1853de.tar.gz rails-1f505a8ef21a300c22e4c6a3cc4d3bf4cf1853de.tar.bz2 rails-1f505a8ef21a300c22e4c6a3cc4d3bf4cf1853de.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'railties/guides/source/getting_started.textile')
-rw-r--r-- | railties/guides/source/getting_started.textile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 3011f7136b..6aca5d3420 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -5,7 +5,7 @@ This guide covers getting up and running with Ruby on Rails. After reading it, y * Installing Rails, creating a new Rails application, and connecting your application to a database * The general layout of a Rails application * The basic principles of MVC (Model, View Controller) and RESTful design -* How to quickly generate the starting pieces of a Rails application. +* How to quickly generate the starting pieces of a Rails application endprologue. @@ -205,8 +205,8 @@ h4. Configuring a Database Just about every Rails application will interact with a database. The database to use is specified in a configuration file, +config/database.yml+. If you open this file in a new Rails application, you'll see a default database configuration using SQLite3. The file contains sections for three different environments in which Rails can run by default: -* The +development+ environment is used on your development computer as you interact manually with the application -* The +test+ environment is used to run automated tests +* The +development+ environment is used on your development computer as you interact manually with the application. +* The +test+ environment is used to run automated tests. * The +production+ environment is used when you deploy your application for the world to use. h5. Configuring an SQLite3 Database @@ -289,7 +289,7 @@ development: database: blog_development username: blog password: -<yaml> +</yaml> Change the username and password in the +development+ section as appropriate. @@ -448,10 +448,10 @@ h4. Adding a Link To hook the posts up to the home page you've already created, you can add a link to the home page. Open +app/views/home/index.html.erb+ and modify it as follows: -<code lang="ruby"> +<ruby> <h1>Hello, Rails!</h1> <%= link_to "My Blog", posts_path %> -</code> +</ruby> The +link_to+ method is one of Rails' built-in view helpers. It creates a hyperlink based on text to display and where to go - in this case, to the path for posts. |