aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorOscar Del Ben <info@oscardelben.com>2012-04-24 12:30:24 +0200
committerOscar Del Ben <info@oscardelben.com>2012-04-24 12:30:24 +0200
commit5acb345a86584e3c9c4b5a81c4499c767393c89a (patch)
tree6ee77b19137bcf8c02b309f43e74d49c6f9bd7e6 /guides
parente6de2084ef8a98c04e300b4cff273a62bfdc7dc7 (diff)
downloadrails-5acb345a86584e3c9c4b5a81c4499c767393c89a.tar.gz
rails-5acb345a86584e3c9c4b5a81c4499c767393c89a.tar.bz2
rails-5acb345a86584e3c9c4b5a81c4499c767393c89a.zip
Fix some code in getting started guide
Diffstat (limited to 'guides')
-rw-r--r--guides/code/getting_started/app/helpers/welcome_helper.rb (renamed from guides/code/getting_started/app/helpers/home_helper.rb)0
-rw-r--r--guides/source/getting_started.textile14
2 files changed, 5 insertions, 9 deletions
diff --git a/guides/code/getting_started/app/helpers/home_helper.rb b/guides/code/getting_started/app/helpers/welcome_helper.rb
index eeead45fc9..eeead45fc9 100644
--- a/guides/code/getting_started/app/helpers/home_helper.rb
+++ b/guides/code/getting_started/app/helpers/welcome_helper.rb
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile
index f184004f80..73f85ab8f9 100644
--- a/guides/source/getting_started.textile
+++ b/guides/source/getting_started.textile
@@ -516,7 +516,7 @@ end
A couple of things to note. We use +Post.find+ to find the post we're
interested in. We also use an instance variable (prefixed by +@+) to
-hold our reference to the post object. We do this because Rails will pass all instance
+hold a reference to the post object. We do this because Rails will pass all instance
variables to the view.
Now, create a new file +app/view/posts/show.html.erb+ with the following
@@ -577,8 +577,8 @@ end
h4. Adding links
-You can now create, show, and list posts. But it's difficult to navigate
-through pages, so let's add some links.
+You can now create, show, and list posts. Now let's add some links to
+navigate through pages.
Open +app/views/welcome/index.html.erb+ and modify it as follows:
@@ -657,11 +657,9 @@ controller by default.
TIP: In development mode (which is what you're working in by default), Rails
reloads your application with every browser request, so there's no need to stop
-and restart the web server.
+and restart the web server when a change is made.
-Congratulations, you're riding the rails! Now it’s time to see how it all works.
-
-h4. The Model
+h4. Adding Some Validation
The model file, +app/models/post.rb+ is about as simple as it can get:
@@ -676,8 +674,6 @@ your Rails models for free, including basic database CRUD (Create, Read, Update,
Destroy) operations, data validation, as well as sophisticated search support
and the ability to relate multiple models to one another.
-h4. Adding Some Validation
-
Rails includes methods to help you validate the data that you send to models.
Open the +app/models/post.rb+ file and edit it: