diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-11 10:10:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 10:10:22 +0900 |
commit | d4e2824d8d9aea6d95e78275c0107bbbc48300d9 (patch) | |
tree | 0998d43ce42eb762e3757f65d35fc975b74377d1 /guides/source/engines.md | |
parent | 43288a053feecf7cdbe74e61f3ca2038d976e9f4 (diff) | |
parent | 923a0027902ba3829d08bb5350050ef71f7c0420 (diff) | |
download | rails-d4e2824d8d9aea6d95e78275c0107bbbc48300d9.tar.gz rails-d4e2824d8d9aea6d95e78275c0107bbbc48300d9.tar.bz2 rails-d4e2824d8d9aea6d95e78275c0107bbbc48300d9.zip |
Merge pull request #35924 from soartec-lab/update_guide_engine_generator_result
Update the result of generate command [skip ci]
Diffstat (limited to 'guides/source/engines.md')
-rw-r--r-- | guides/source/engines.md | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/guides/source/engines.md b/guides/source/engines.md index 5afedaadab..5446c1c188 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -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 ``` |