diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-29 00:11:56 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-29 00:11:56 +0000 |
commit | 06744bb4c5777cae45dca3b0ed4826ab14cbc558 (patch) | |
tree | b98960f3fee88a1ae10f39fdf14da4b527fafd03 /railties/lib/rails_generator/generators/components/resource/USAGE | |
parent | 428d1f67dab05b84330c7fc66bff0202aee91bd8 (diff) | |
download | rails-06744bb4c5777cae45dca3b0ed4826ab14cbc558.tar.gz rails-06744bb4c5777cae45dca3b0ed4826ab14cbc558.tar.bz2 rails-06744bb4c5777cae45dca3b0ed4826ab14cbc558.zip |
Generated migrations include timestamps by default. Closes #8501.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/resource/USAGE')
-rw-r--r-- | railties/lib/rails_generator/generators/components/resource/USAGE | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/railties/lib/rails_generator/generators/components/resource/USAGE b/railties/lib/rails_generator/generators/components/resource/USAGE index 37faf2aba9..d396775a41 100644 --- a/railties/lib/rails_generator/generators/components/resource/USAGE +++ b/railties/lib/rails_generator/generators/components/resource/USAGE @@ -10,8 +10,11 @@ Description: As additional parameters, the generator will take attribute pairs described by name and type. These attributes will be used to prepopulate the migration to create the table for the model. For - example, "resource post title:string created_on:date body:text - published:boolean" will give you a Post model with those four attributes. + example, "resource post title:string body:text published:boolean" will + give you a Post model with those three attributes. + + By default, created_at and updated_at timestamps are added to migration + for you, so you needn't specify them by hand. You don't have to think up all attributes up front, but it's a good idea of adding just the baseline of what's needed to start really @@ -26,5 +29,5 @@ Description: Examples: ./script/generate resource post # no attributes - ./script/generate resource post title:string created_on:date body:text published:boolean - ./script/generate resource purchase order_id:integer created_at:datetime amount:decimal + ./script/generate resource post title:string body:text published:boolean + ./script/generate resource purchase order_id:integer amount:decimal |