mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
[engines guide] make clear that the comment generator command is just one line
This commit is contained in:
@@ -212,12 +212,17 @@ 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
|
||||
</shell>
|
||||
|
||||
This will output the following:
|
||||
|
||||
<shell>
|
||||
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+.
|
||||
|
||||
Reference in New Issue
Block a user