aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/rails
diff options
context:
space:
mode:
authorRomD <romd86@gmail.com>2010-02-06 17:18:10 +0100
committerCarl Lerche <carllerche@mac.com>2010-02-06 09:51:53 -0800
commitf44a0b1d524064a2e919cd10d3013db680af9b17 (patch)
tree43011f4c151d45dbecdf0eeb78806e9ac3e8f391 /railties/lib/generators/rails
parent6958eac1a00a4ab33e3facc70c80a07492288196 (diff)
downloadrails-f44a0b1d524064a2e919cd10d3013db680af9b17.tar.gz
rails-f44a0b1d524064a2e919cd10d3013db680af9b17.tar.bz2
rails-f44a0b1d524064a2e919cd10d3013db680af9b17.zip
fix usage examples and more to use new invocations
Signed-off-by: Carl Lerche <carllerche@mac.com>
Diffstat (limited to 'railties/lib/generators/rails')
-rw-r--r--railties/lib/generators/rails/app/templates/README16
-rw-r--r--railties/lib/generators/rails/controller/USAGE2
-rw-r--r--railties/lib/generators/rails/generator/USAGE2
-rw-r--r--railties/lib/generators/rails/generator/templates/USAGE.tt2
-rw-r--r--railties/lib/generators/rails/helper/USAGE2
-rw-r--r--railties/lib/generators/rails/integration_test/USAGE2
-rw-r--r--railties/lib/generators/rails/mailer/USAGE2
-rw-r--r--railties/lib/generators/rails/metal/USAGE2
-rw-r--r--railties/lib/generators/rails/migration/USAGE4
-rw-r--r--railties/lib/generators/rails/model/USAGE4
-rw-r--r--railties/lib/generators/rails/observer/USAGE2
-rw-r--r--railties/lib/generators/rails/performance_test/USAGE2
-rw-r--r--railties/lib/generators/rails/plugin/USAGE2
-rw-r--r--railties/lib/generators/rails/resource/USAGE6
-rw-r--r--railties/lib/generators/rails/scaffold/USAGE8
-rw-r--r--railties/lib/generators/rails/scaffold_controller/USAGE2
-rw-r--r--railties/lib/generators/rails/session_migration/USAGE2
-rw-r--r--railties/lib/generators/rails/stylesheets/USAGE2
18 files changed, 32 insertions, 32 deletions
diff --git a/railties/lib/generators/rails/app/templates/README b/railties/lib/generators/rails/app/templates/README
index 37ec8ea211..b175146797 100644
--- a/railties/lib/generators/rails/app/templates/README
+++ b/railties/lib/generators/rails/app/templates/README
@@ -29,14 +29,14 @@ link:files/vendor/rails/actionpack/README.html.
1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
and your application name. Ex: rails myapp
-2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
+2. Change directory into myapp and start the web server: <tt>rails server</tt> (run with --help for options)
3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
4. Follow the guidelines to start developing your application
== Web Servers
-By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails
+By default, Rails will try to use Mongrel if it's are installed when started with <tt>rails server</tt>, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails
with a variety of other web servers.
Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
@@ -164,20 +164,20 @@ Finally, when you're ready to resume execution, you enter "cont"
== Console
-You can interact with the domain model by starting the console through <tt>script/console</tt>.
+You can interact with the domain model by starting the console through <tt>rails console</tt>.
Here you'll have all parts of the application configured, just like it is when the
application is running. You can inspect domain models, change values, and save to the
database. Starting the script without arguments will launch it in the development environment.
-Passing an argument will specify a different environment, like <tt>script/console production</tt>.
+Passing an argument will specify a different environment, like <tt>rails console production</tt>.
To reload your controllers and models after launching the console run <tt>reload!</tt>
== dbconsole
-You can go to the command line of your database directly through <tt>script/dbconsole</tt>.
+You can go to the command line of your database directly through <tt>rails dbconsole</tt>.
You would be connected to the database with the credentials defined in database.yml.
Starting the script without arguments will connect you to the development database. Passing an
-argument will connect you to a different database, like <tt>script/dbconsole production</tt>.
+argument will connect you to a different database, like <tt>rails dbconsole production</tt>.
Currently works for mysql, postgresql and sqlite.
== Description of Contents
@@ -207,7 +207,7 @@ app/views/layouts
app/helpers
Holds view helpers that should be named like weblogs_helper.rb. These are generated
- for you automatically when using script/generate for controllers. Helpers can be used to
+ for you automatically when using <tt>rails generate</tt> for controllers. Helpers can be used to
wrap functionality for your views into methods.
config
@@ -234,7 +234,7 @@ script
Helper scripts for automation and generation.
test
- Unit and functional tests along with fixtures. When using the script/generate scripts, template
+ Unit and functional tests along with fixtures. When using the <tt>rails generate</tt> scripts, template
test files will be generated for you and placed in this directory.
vendor
diff --git a/railties/lib/generators/rails/controller/USAGE b/railties/lib/generators/rails/controller/USAGE
index 6ed4b2edfc..70618a3906 100644
--- a/railties/lib/generators/rails/controller/USAGE
+++ b/railties/lib/generators/rails/controller/USAGE
@@ -9,7 +9,7 @@ Description:
template engine and test framework generators.
Example:
- `./script/generate controller CreditCard open debit credit close`
+ `rails generate controller CreditCard open debit credit close`
Credit card controller with URLs like /credit_card/debit.
Controller: app/controllers/credit_card_controller.rb
diff --git a/railties/lib/generators/rails/generator/USAGE b/railties/lib/generators/rails/generator/USAGE
index ca7d3f62d0..d8c3f7f634 100644
--- a/railties/lib/generators/rails/generator/USAGE
+++ b/railties/lib/generators/rails/generator/USAGE
@@ -3,7 +3,7 @@ Description:
CamelCased or under_scored, as an argument.
Example:
- `./script/generate generator Awesome`
+ `rails generate generator Awesome`
creates a standard awesome generator:
lib/generators/awesome/
diff --git a/railties/lib/generators/rails/generator/templates/USAGE.tt b/railties/lib/generators/rails/generator/templates/USAGE.tt
index ea9f4f12cc..1bb8df840d 100644
--- a/railties/lib/generators/rails/generator/templates/USAGE.tt
+++ b/railties/lib/generators/rails/generator/templates/USAGE.tt
@@ -2,7 +2,7 @@ Description:
Explain the generator
Example:
- ./script/generate <%= file_name %> Thing
+ rails generate <%= file_name %> Thing
This will create:
what/will/it/create
diff --git a/railties/lib/generators/rails/helper/USAGE b/railties/lib/generators/rails/helper/USAGE
index 531c9b390a..c0ddb0f606 100644
--- a/railties/lib/generators/rails/helper/USAGE
+++ b/railties/lib/generators/rails/helper/USAGE
@@ -9,7 +9,7 @@ Description:
test framework.
Example:
- `./script/generate helper CreditCard`
+ `rails generate helper CreditCard`
Credit card helper.
Helper: app/helpers/credit_card_helper.rb
diff --git a/railties/lib/generators/rails/integration_test/USAGE b/railties/lib/generators/rails/integration_test/USAGE
index b76c35a702..57ee3543e6 100644
--- a/railties/lib/generators/rails/integration_test/USAGE
+++ b/railties/lib/generators/rails/integration_test/USAGE
@@ -6,5 +6,5 @@ Description:
TestUnit.
Example:
- `./script/generate integration_test GeneralStories` creates a GeneralStories
+ `rails generate integration_test GeneralStories` creates a GeneralStories
integration test in test/integration/general_stories_test.rb
diff --git a/railties/lib/generators/rails/mailer/USAGE b/railties/lib/generators/rails/mailer/USAGE
index beae79fbf4..a08d459739 100644
--- a/railties/lib/generators/rails/mailer/USAGE
+++ b/railties/lib/generators/rails/mailer/USAGE
@@ -6,7 +6,7 @@ Description:
engine and test framework generators.
Example:
- `./script/generate mailer Notifications signup forgot_password invoice`
+ `rails generate mailer Notifications signup forgot_password invoice`
creates a Notifications mailer class, views, test, and fixtures:
Mailer: app/mailers/notifications.rb
diff --git a/railties/lib/generators/rails/metal/USAGE b/railties/lib/generators/rails/metal/USAGE
index 123ec6c03f..c88325a444 100644
--- a/railties/lib/generators/rails/metal/USAGE
+++ b/railties/lib/generators/rails/metal/USAGE
@@ -2,7 +2,7 @@ Description:
Cast some metal!
Examples:
- `./script/generate metal poller`
+ `rails generate metal poller`
This will create:
Metal: app/metal/poller.rb
diff --git a/railties/lib/generators/rails/migration/USAGE b/railties/lib/generators/rails/migration/USAGE
index d91127aac3..d21c81b760 100644
--- a/railties/lib/generators/rails/migration/USAGE
+++ b/railties/lib/generators/rails/migration/USAGE
@@ -8,12 +8,12 @@ Description:
column lines from supplied attributes: AddColumnsToTable or RemoveColumnsFromTable
Example:
- `./script/generate migration AddSslFlag`
+ `rails generate migration AddSslFlag`
If the current date is May 14, 2008 and the current time 09:09:12, this creates the AddSslFlag migration
db/migrate/20080514090912_add_ssl_flag.rb
- `./script/generate migration AddTitleBodyToPost title:string body:text published:boolean`
+ `rails generate migration AddTitleBodyToPost title:string body:text published:boolean`
This will create the AddTitleBodyToPost in db/migrate/20080514090912_add_title_body_to_post.rb with
this in the Up migration:
diff --git a/railties/lib/generators/rails/model/USAGE b/railties/lib/generators/rails/model/USAGE
index b056d5df8b..d97e9ac103 100644
--- a/railties/lib/generators/rails/model/USAGE
+++ b/railties/lib/generators/rails/model/USAGE
@@ -16,7 +16,7 @@ Description:
created model. This allows you create Single Table Inheritance models.
Examples:
- `./script/generate model account`
+ `rails generate model account`
For ActiveRecord and TestUnit it creates:
@@ -25,6 +25,6 @@ Examples:
Fixtures: test/fixtures/accounts.yml
Migration: db/migrate/XXX_add_accounts.rb
- `./script/generate model post title:string body:text published:boolean`
+ `rails generate model post title:string body:text published:boolean`
Creates a Post model with a string title, text body, and published flag.
diff --git a/railties/lib/generators/rails/observer/USAGE b/railties/lib/generators/rails/observer/USAGE
index 9a20f55a89..d8f32a6a48 100644
--- a/railties/lib/generators/rails/observer/USAGE
+++ b/railties/lib/generators/rails/observer/USAGE
@@ -5,7 +5,7 @@ Description:
This generator only invokes your ORM and test framework generators.
Example:
- `./script/generate observer Account`
+ `rails generate observer Account`
For ActiveRecord and TestUnit it creates:
Observer: app/models/account_observer.rb
diff --git a/railties/lib/generators/rails/performance_test/USAGE b/railties/lib/generators/rails/performance_test/USAGE
index ee82578cdb..9dc799559c 100644
--- a/railties/lib/generators/rails/performance_test/USAGE
+++ b/railties/lib/generators/rails/performance_test/USAGE
@@ -6,5 +6,5 @@ Description:
TestUnit.
Example:
- `./script/generate performance_test GeneralStories` creates a GeneralStories
+ `rails generate performance_test GeneralStories` creates a GeneralStories
performance test in test/performance/general_stories_test.rb
diff --git a/railties/lib/generators/rails/plugin/USAGE b/railties/lib/generators/rails/plugin/USAGE
index 8a17fa4dec..00a429c585 100644
--- a/railties/lib/generators/rails/plugin/USAGE
+++ b/railties/lib/generators/rails/plugin/USAGE
@@ -3,7 +3,7 @@ Description:
CamelCased or under_scored, as an argument.
Example:
- `./script/generate plugin BrowserFilters`
+ `rails generate plugin BrowserFilters`
creates a standard browser_filters plugin:
vendor/plugins/browser_filters/README
diff --git a/railties/lib/generators/rails/resource/USAGE b/railties/lib/generators/rails/resource/USAGE
index 936619b0db..e359cd574f 100644
--- a/railties/lib/generators/rails/resource/USAGE
+++ b/railties/lib/generators/rails/resource/USAGE
@@ -18,6 +18,6 @@ Description:
views or add any methods to the generated controller.
Examples:
- `./script/generate resource post` # no attributes
- `./script/generate resource post title:string body:text published:boolean`
- `./script/generate resource purchase order_id:integer amount:decimal`
+ `rails generate resource post` # no attributes
+ `rails generate resource post title:string body:text published:boolean`
+ `rails generate resource purchase order_id:integer amount:decimal`
diff --git a/railties/lib/generators/rails/scaffold/USAGE b/railties/lib/generators/rails/scaffold/USAGE
index 530ccdaf0a..be1d113ed8 100644
--- a/railties/lib/generators/rails/scaffold/USAGE
+++ b/railties/lib/generators/rails/scaffold/USAGE
@@ -21,9 +21,9 @@ Description:
declaration in config/routes.rb.
If you want to remove all the generated files, run
- 'script/destroy scaffold ModelName'.
+ 'rails destroy scaffold ModelName'.
Examples:
- `./script/generate scaffold post`
- `./script/generate scaffold post title:string body:text published:boolean`
- `./script/generate scaffold purchase order_id:integer amount:decimal`
+ `rails generate scaffold post`
+ `rails generate scaffold post title:string body:text published:boolean`
+ `rails generate scaffold purchase order_id:integer amount:decimal`
diff --git a/railties/lib/generators/rails/scaffold_controller/USAGE b/railties/lib/generators/rails/scaffold_controller/USAGE
index d60a3c3680..673f69bc81 100644
--- a/railties/lib/generators/rails/scaffold_controller/USAGE
+++ b/railties/lib/generators/rails/scaffold_controller/USAGE
@@ -11,7 +11,7 @@ Description:
template engine and test framework generators.
Example:
- `./script/generate scaffold_controller CreditCard`
+ `rails generate scaffold_controller CreditCard`
Credit card controller with URLs like /credit_card/debit.
Controller: app/controllers/credit_cards_controller.rb
diff --git a/railties/lib/generators/rails/session_migration/USAGE b/railties/lib/generators/rails/session_migration/USAGE
index e106f6ecc8..564d1ffd78 100644
--- a/railties/lib/generators/rails/session_migration/USAGE
+++ b/railties/lib/generators/rails/session_migration/USAGE
@@ -5,4 +5,4 @@ Description:
Before invoking this generator, be sure that your ORM supports session stores.
Example:
- `./script/generate session_migration CreateSessionTable`
+ `rails generate session_migration CreateSessionTable`
diff --git a/railties/lib/generators/rails/stylesheets/USAGE b/railties/lib/generators/rails/stylesheets/USAGE
index d6a81e51d0..59e5495d0b 100644
--- a/railties/lib/generators/rails/stylesheets/USAGE
+++ b/railties/lib/generators/rails/stylesheets/USAGE
@@ -2,4 +2,4 @@ Description:
Copies scaffold stylesheets to public/stylesheets/.
Examples:
- `./script/generate stylesheets`
+ `rails generate stylesheets`