aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/engines.md
diff options
context:
space:
mode:
authorsoartec-lab <info@soartec-lab.work>2019-04-09 23:46:16 +0900
committersoartec-lab <info@soartec-lab.work>2019-04-09 23:51:04 +0900
commitc1a3ab2227930ee27dc8039ca91091a02833e06d (patch)
tree1e94e67a6a09bea7c7c81390e44a7ce8be622780 /guides/source/engines.md
parent483d0dcb7649fc403bbad40719d82dc0a901f49e (diff)
downloadrails-c1a3ab2227930ee27dc8039ca91091a02833e06d.tar.gz
rails-c1a3ab2227930ee27dc8039ca91091a02833e06d.tar.bz2
rails-c1a3ab2227930ee27dc8039ca91091a02833e06d.zip
Add all descriptions in app directory [skip ci]
Diffstat (limited to 'guides/source/engines.md')
-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 5afedaadab..ac9dd38359 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