aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-06-16 22:48:05 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-06-16 22:49:06 +0530
commit07d62ff7191f3334dffece1495a38b35f5669cbf (patch)
treef76b221ec6006102627742c4f727caefeac7935d /railties/guides
parent7c2db6ce37aa37014ad216e0f5070c6b147382e7 (diff)
downloadrails-07d62ff7191f3334dffece1495a38b35f5669cbf.tar.gz
rails-07d62ff7191f3334dffece1495a38b35f5669cbf.tar.bz2
rails-07d62ff7191f3334dffece1495a38b35f5669cbf.zip
minor clean up generators section
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/command_line.textile9
1 files changed, 5 insertions, 4 deletions
diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile
index dd21fb0e93..43f2aad5bf 100644
--- a/railties/guides/source/command_line.textile
+++ b/railties/guides/source/command_line.textile
@@ -83,7 +83,7 @@ $ rails server -e production -p 4000
h4. +rails generate+
-The +rails generate+ command uses templates to create a whole lot of things. You can always find out what's available by running +rails generate+ by itself. Let's do that:
+The +rails generate+ command uses templates to create a whole lot of things. Running +rails generate+ by itself gives a list of available generators:
<shell>
$ rails generate
@@ -103,7 +103,7 @@ Rails:
NOTE: You can install more generators through generator gems, portions of plugins you'll undoubtedly install, and you can even create your own!
-Using generators will save you a large amount of time by writing *boilerplate code*, code that is necessary for the app to work, but not necessary for you to spend time writing. That's what we have computers for.
+Using generators will save you a large amount of time by writing *boilerplate code*, code that is necessary for the app to work.
Let's make our own controller with the controller generator. But what command should we use? Let's ask the generator:
@@ -152,7 +152,8 @@ $ rails generate controller Greetings hello
create test/unit/helpers/greetings_helper_test.rb
invoke assets
create app/assets/javascripts/greetings.js
- create app/assets/stylesheets/greetings.css
+ invoke css
+ create app/assets/stylesheets/greetings.css
</shell>
@@ -188,7 +189,7 @@ The URL will be "http://localhost:3000/greetings/hello":http://localhost:3000/gr
INFO: With a normal, plain-old Rails application, your URLs will generally follow the pattern of http://(host)/(controller)/(action), and a URL like http://(host)/(controller) will hit the *index* action of that controller.
-Rails comes with a generator for data models too:
+Rails comes with a generator for data models too.
<shell>
$ rails generate model