aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorsoartec-lab <info@soartec-lab.work>2019-04-10 23:50:03 +0900
committersoartec-lab <info@soartec-lab.work>2019-04-11 09:56:29 +0900
commit923a0027902ba3829d08bb5350050ef71f7c0420 (patch)
tree3785b7fcf2aca40b82ec874a757133d9d406c18a /guides
parent63ca58ae7bbafa0983ed8968ea6310ef33956261 (diff)
downloadrails-923a0027902ba3829d08bb5350050ef71f7c0420.tar.gz
rails-923a0027902ba3829d08bb5350050ef71f7c0420.tar.bz2
rails-923a0027902ba3829d08bb5350050ef71f7c0420.zip
Update the result of generate command [skip ci]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/engines.md20
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
```