aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/getting_started.textile
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides/source/getting_started.textile')
-rw-r--r--railties/guides/source/getting_started.textile24
1 files changed, 9 insertions, 15 deletions
diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile
index 4823876f19..48393d2156 100644
--- a/railties/guides/source/getting_started.textile
+++ b/railties/guides/source/getting_started.textile
@@ -194,15 +194,13 @@ In any case, Rails will create a folder in your working directory called <tt>blo
h4. Installing the Required Gems
-Rails uses the "Bundler":http://www.github.com/carlhuda/bundler gem to populate the +vendor+ directory with all the gems your application depends on. As we don't need any special gems beyond the default, we just need to do the following:
+Rails applications manage gem dependencies with "Bundler":http://gembundler.com/v1.0/index.html by default. As we don't need any other gems beyond the ones in the generated +Gemfile+ we can directly run
<shell>
-As the root user:
-# gem install bundler
-# bundle install
+bundle install
</shell>
-This will copy down the versions of all the gems you need to start a rails application.
+to have them ready.
h4. Configuring a Database
@@ -322,7 +320,7 @@ $ rm public/index.html
We need to do this as Rails will deliver any static file in the +public+ directory in preference to any dynamic contact we generate from the controllers.
-Now, you have to tell Rails where your actual home page is located. Open the file +config/routes.rb+ in your editor. This is your application's _routing file_ which holds entries in a special DSL (domain-specific language) that tells Rails how to connect incoming requests to controllers and actions. This file contains many sample routes on commented lines, and one of them actually shows you how to connect the root of your site to a specific controller and action. Find the line beginning with +:root to+, uncomment it and change it like the following:
+Now, you have to tell Rails where your actual home page is located. Open the file +config/routes.rb+ in your editor. This is your application's _routing file_ which holds entries in a special DSL (domain-specific language) that tells Rails how to connect incoming requests to controllers and actions. This file contains many sample routes on commented lines, and one of them actually shows you how to connect the root of your site to a specific controller and action. Find the line beginning with +root :to+, uncomment it and change it like the following:
<ruby>
Blog::Application.routes.draw do
@@ -1058,8 +1056,7 @@ Then in the +app/views/posts/show.html.erb+ you can change it to look like the f
</p>
<h2>Comments</h2>
-<%= render :partial => "comments/comment",
- :collection => @post.comments %>
+<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= form_for([@post, @post.comments.build]) do |f| %>
@@ -1129,8 +1126,7 @@ Then you make the +app/views/posts/show.html.erb+ look like the following:
</p>
<h2>Comments</h2>
-<%= render :partial => "comments/comment",
- :collection => @post.comments %>
+<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= render "comments/form" %>
@@ -1383,8 +1379,7 @@ Finally, we will edit the <tt>app/views/posts/show.html.erb</tt> template to sho
</p>
<h2>Comments</h2>
-<%= render :partial => "comments/comment",
- :collection => @post.comments %>
+<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= render "comments/form" %>
@@ -1438,8 +1433,7 @@ Now you can edit the view in <tt>app/views/posts/show.html.erb</tt> to look like
</p>
<h2>Comments</h2>
-<%= render :partial => "comments/comment",
- :collection => @post.comments %>
+<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= render "comments/form" %>
@@ -1453,7 +1447,7 @@ h3. What's Next?
Now that you've seen your first Rails application, you should feel free to update it and experiment on your own. But you don't have to do everything without help. As you need assistance getting up and running with Rails, feel free to consult these support resources:
-* The "Ruby On Rails guides":index.html
+* The "Ruby on Rails guides":index.html
* The "Ruby on Rails mailing list":http://groups.google.com/group/rubyonrails-talk
* The "#rubyonrails":irc://irc.freenode.net/#rubyonrails channel on irc.freenode.net
* The "Rails Wiki":http://wiki.rubyonrails.org/