diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2011-10-14 07:51:07 +1100 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2011-10-14 18:44:39 +1100 |
commit | 2101bc9fd00f284ee5f86e72f35df9937289871b (patch) | |
tree | 652aadc025531dadd982e461e606d9b8e6d375c0 /railties/guides/source/engines.textile | |
parent | 690dd2f64c01985ece8690b9ac1c1ff2dfb6d968 (diff) | |
download | rails-2101bc9fd00f284ee5f86e72f35df9937289871b.tar.gz rails-2101bc9fd00f284ee5f86e72f35df9937289871b.tar.bz2 rails-2101bc9fd00f284ee5f86e72f35df9937289871b.zip |
[engines guide] make it clear that the scaffold generator output isn't part of the actual command
Diffstat (limited to 'railties/guides/source/engines.textile')
-rw-r--r-- | railties/guides/source/engines.textile | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/railties/guides/source/engines.textile b/railties/guides/source/engines.textile index faa9dff8b8..0df3889193 100644 --- a/railties/guides/source/engines.textile +++ b/railties/guides/source/engines.textile @@ -106,6 +106,11 @@ The first thing to generate for a blog engine is the +Post+ model and related co <shell> $ rails generate scaffold post title:string text:text +</shell> + +This command will output this information: + +<shell> invoke active_record create db/migrate/[timestamp]_create_blorgh_posts.rb create app/models/blorgh/post.rb @@ -207,12 +212,12 @@ Run the model generator and tell it to generate a +Comment+ model, with the rela <shell> $ rails generate model Comment post_id:integer text:text -invoke active_record -create db/migrate/[timestamp]_create_blorgh_comments.rb -create app/models/blorgh/comment.rb -invoke test_unit -create test/unit/blorgh/comment_test.rb -create test/fixtures/blorgh/comments.yml + invoke active_record + create db/migrate/[timestamp]_create_blorgh_comments.rb + create app/models/blorgh/comment.rb + invoke test_unit + create test/unit/blorgh/comment_test.rb + create test/fixtures/blorgh/comments.yml </shell> This generator call will generate just the necessary model files it needs, namespacing the files under a +blorgh+ directory and creating a model class called +Blorgh::Comment+. |