aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2019-04-11 19:02:29 -0400
committerGitHub <noreply@github.com>2019-04-11 19:02:29 -0400
commit936603f62ab866fdfef810263b716e5e060b7f1f (patch)
tree95f0c9b44af5630120696681f1e91fe9230e8e1b /guides
parent98e10c2deab755f49941676965cb8e30a843b4a5 (diff)
parentc1a3ab2227930ee27dc8039ca91091a02833e06d (diff)
downloadrails-936603f62ab866fdfef810263b716e5e060b7f1f.tar.gz
rails-936603f62ab866fdfef810263b716e5e060b7f1f.tar.bz2
rails-936603f62ab866fdfef810263b716e5e060b7f1f.zip
Merge pull request #35908 from soartec-lab/update_guide_engine_app_dir
Add all descriptions in app directory [skip ci]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/engines.md28
1 files changed, 25 insertions, 3 deletions
diff --git a/guides/source/engines.md b/guides/source/engines.md
index 84a49bec9b..3031c62928 100644
--- a/guides/source/engines.md
+++ b/guides/source/engines.md
@@ -218,9 +218,7 @@ important parts about namespacing, and is discussed later in the
Inside the `app` directory are the standard `assets`, `controllers`, `helpers`,
`jobs`, `mailers`, `models`, and `views` directories that you should be familiar with
-from an application. The `helpers`, `mailers`, and `models` directories are
-empty, so they aren't described in this section. We'll look more into models in
-a future section, when we're writing the engine.
+from an application. We'll look more into models in a future section, when we're writing the engine.
Within the `app/assets` directory, there are the `images`, `javascripts` and
`stylesheets` directories which, again, you should be familiar with due to their
@@ -261,6 +259,30 @@ WARNING: Don't use `require` because it will break the automatic reloading of cl
in the development environment - using `require_dependency` ensures that classes are
loaded and unloaded in the correct manner.
+Within the `app/helpers` directory there is a `blorgh` directory that
+contains a file called `application_helper.rb`. This file will provide any
+common functionality for the helpers of the engine. The `blorgh` directory
+is where the other helpers for the engine will go. By placing them within
+this namespaced directory, you prevent them from possibly clashing with
+identically-named helpers within other engines or even within the
+application.
+
+Within the `app/jobs` directory there is a `blorgh` directory that
+contains a file called `application_job.rb`. This file will provide any
+common functionality for the jobs of the engine. The `blorgh` directory
+is where the other jobs for the engine will go. By placing them within
+this namespaced directory, you prevent them from possibly clashing with
+identically-named jobs within other engines or even within the
+application.
+
+Within the `app/mailers` directory there is a `blorgh` directory that
+contains a file called `application_mailer.rb`. This file will provide any
+common functionality for the mailers of the engine. The `blorgh` directory
+is where the other mailers for the engine will go. By placing them within
+this namespaced directory, you prevent them from possibly clashing with
+identically-named mailers within other engines or even within the
+application.
+
Lastly, the `app/views` directory contains a `layouts` folder, which contains a
file at `blorgh/application.html.erb`. This file allows you to specify a layout
for the engine. If this engine is to be used as a stand-alone engine, then you