mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #35924 from soartec-lab/update_guide_engine_generator_result
Update the result of generate command [skip ci]
This commit is contained in:
commit
d4e2824d8d
1 changed files with 6 additions and 14 deletions
|
@ -347,14 +347,11 @@ create app/views/blorgh/articles/new.html.erb
|
|||
create app/views/blorgh/articles/_form.html.erb
|
||||
invoke test_unit
|
||||
create test/controllers/blorgh/articles_controller_test.rb
|
||||
create test/system/blorgh/articles_test.rb
|
||||
invoke helper
|
||||
create app/helpers/blorgh/articles_helper.rb
|
||||
invoke test_unit
|
||||
create test/application_system_test_case.rb
|
||||
create test/system/articles_test.rb
|
||||
invoke test_unit
|
||||
invoke assets
|
||||
invoke js
|
||||
create app/assets/javascripts/blorgh/articles.js
|
||||
invoke css
|
||||
create app/assets/stylesheets/blorgh/articles.css
|
||||
invoke css
|
||||
|
@ -394,9 +391,8 @@ be isolated from those routes that are within the application. The
|
|||
Next, the `scaffold_controller` generator is invoked, generating a controller
|
||||
called `Blorgh::ArticlesController` (at
|
||||
`app/controllers/blorgh/articles_controller.rb`) and its related views at
|
||||
`app/views/blorgh/articles`. This generator also generates a test for the
|
||||
controller (`test/controllers/blorgh/articles_controller_test.rb`) and a helper
|
||||
(`app/helpers/blorgh/articles_helper.rb`).
|
||||
`app/views/blorgh/articles`. This generator also generates tests for the
|
||||
controller (`test/controllers/blorgh/articles_controller_test.rb` and `test/system/blorgh/articles_test.rb`) and a helper (`app/helpers/blorgh/articles_helper.rb`).
|
||||
|
||||
Everything this generator has created is neatly namespaced. The controller's
|
||||
class is defined within the `Blorgh` module:
|
||||
|
@ -425,10 +421,7 @@ end
|
|||
This helps prevent conflicts with any other engine or application that may have
|
||||
an article resource as well.
|
||||
|
||||
Finally, the assets for this resource are generated in two files:
|
||||
`app/assets/javascripts/blorgh/articles.js` and
|
||||
`app/assets/stylesheets/blorgh/articles.css`. You'll see how to use these a little
|
||||
later.
|
||||
Finally, the assets for this resource are generated in one file: `app/assets/stylesheets/blorgh/articles.css`. You'll see how to use these a little later.
|
||||
|
||||
You can see what the engine has so far by running `rails db:migrate` at the root
|
||||
of our engine to run the migration generated by the scaffold generator, and then
|
||||
|
@ -579,9 +572,8 @@ invoke test_unit
|
|||
create test/controllers/blorgh/comments_controller_test.rb
|
||||
invoke helper
|
||||
create app/helpers/blorgh/comments_helper.rb
|
||||
invoke test_unit
|
||||
invoke assets
|
||||
invoke js
|
||||
create app/assets/javascripts/blorgh/comments.js
|
||||
invoke css
|
||||
create app/assets/stylesheets/blorgh/comments.css
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue