From dc88d71d51660f25e8a5e07ba08f855b42a49c6a Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sun, 6 Jan 2013 15:14:08 +0900 Subject: Fix generated migration file name in model generator USAGE --- railties/lib/rails/generators/rails/model/USAGE | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/model/USAGE b/railties/lib/rails/generators/rails/model/USAGE index e29e19490e..6574200fbf 100644 --- a/railties/lib/rails/generators/rails/model/USAGE +++ b/railties/lib/rails/generators/rails/model/USAGE @@ -21,12 +21,12 @@ Description: Available field types: - Just after the field name you can specify a type like text or boolean. + Just after the field name you can specify a type like text or boolean. It will generate the column with the associated SQL type. For instance: `rails generate model post title:string body:text` - will generate a title column with a varchar type and a body column with a text + will generate a title column with a varchar type and a body column with a text type. You can use the following types: integer @@ -57,16 +57,16 @@ Available field types: limit Set the maximum size of the field giving a number between curly braces default Set a default value for the field - precision Defines the precision for the decimal fields + precision Defines the precision for the decimal fields scale Defines the scale for the decimal fields - uniq Defines the field values as unique + uniq Defines the field values as unique index Will add an index on the field Examples: `rails generate model user pseudo:string{30}` `rails generate model user pseudo:string:uniq` - + Examples: `rails generate model account` @@ -76,7 +76,7 @@ Examples: Model: app/models/account.rb Test: test/models/account_test.rb Fixtures: test/fixtures/accounts.yml - Migration: db/migrate/XXX_add_accounts.rb + Migration: db/migrate/XXX_create_accounts.rb `rails generate model post title:string body:text published:boolean` @@ -90,5 +90,5 @@ Examples: Model: app/models/admin/account.rb Test: test/models/admin/account_test.rb Fixtures: test/fixtures/admin/accounts.yml - Migration: db/migrate/XXX_add_admin_accounts.rb + Migration: db/migrate/XXX_create_admin_accounts.rb -- cgit v1.2.3