aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/engines.md
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source/engines.md')
-rw-r--r--guides/source/engines.md26
1 files changed, 14 insertions, 12 deletions
diff --git a/guides/source/engines.md b/guides/source/engines.md
index e7f024f1fc..e630e3d93b 100644
--- a/guides/source/engines.md
+++ b/guides/source/engines.md
@@ -82,8 +82,11 @@ The full list of options for the plugin generator may be seen by typing:
$ bin/rails plugin --help
```
-The `--full` option tells the generator that you want to create an engine,
-including a skeleton structure that provides the following:
+The `--mountable` option tells the generator that you want to create a
+"mountable" and namespace-isolated engine. This generator will provide the same
+skeleton structure as would the `--full` option. The `--full` option tells the
+generator that you want to create an engine, including a skeleton structure
+that provides the following:
* An `app` directory tree
* A `config/routes.rb` file:
@@ -94,7 +97,7 @@ including a skeleton structure that provides the following:
```
* A file at `lib/blorgh/engine.rb`, which is identical in function to a
- * standard Rails application's `config/application.rb` file:
+ standard Rails application's `config/application.rb` file:
```ruby
module Blorgh
@@ -103,9 +106,7 @@ including a skeleton structure that provides the following:
end
```
-The `--mountable` option tells the generator that you want to create a
-"mountable" and namespace-isolated engine. This generator will provide the same
-skeleton structure as would the `--full` option, and will add:
+The `--mountable` option will add to the `--full` option:
* Asset manifest files (`application.js` and `application.css`)
* A namespaced `ApplicationController` stub
@@ -393,7 +394,7 @@ end
```
This helps prevent conflicts with any other engine or application that may have
-a article resource as well.
+an article resource as well.
Finally, the assets for this resource are generated in two files:
`app/assets/javascripts/blorgh/articles.js` and
@@ -505,8 +506,8 @@ NOTE: Because the `has_many` is defined inside a class that is inside the
model for these objects, so there's no need to specify that using the
`:class_name` option here.
-Next, there needs to be a form so that comments can be created on a article. To add
-this, put this line underneath the call to `render @article.comments` in
+Next, there needs to be a form so that comments can be created on an article. To
+add this, put this line underneath the call to `render @article.comments` in
`app/views/blorgh/articles/show.html.erb`:
```erb
@@ -738,9 +739,10 @@ the application. In the case of the `blorgh` engine, making articles and comment
have authors would make a lot of sense.
A typical application might have a `User` class that would be used to represent
-authors for a article or a comment. But there could be a case where the application
-calls this class something different, such as `Person`. For this reason, the
-engine should not hardcode associations specifically for a `User` class.
+authors for an article or a comment. But there could be a case where the
+application calls this class something different, such as `Person`. For this
+reason, the engine should not hardcode associations specifically for a `User`
+class.
To keep it simple in this case, the application will have a class called `User`
that represents the users of the application. It can be generated using this