Permalink
Browse files

[engines guide] improve intro to 'Hooking into an application' section

  • Loading branch information...
1 parent abf4f09 commit bb8ee9264f8302ea9f669c96f46d9c3812d6f350 @radar radar committed Oct 14, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 railties/guides/source/engines.textile
@@ -343,9 +343,13 @@ The +comment_counter+ local variable is given to us by the +<%= render @post.com
That completes the comment function of the blogging engine. Now it's time to use it within an application.
-h3. Hooking into application
+h3. Hooking into an application
-Using an engine within an application is very easy. First, the engine needs to be specified inside the application's +Gemfile+. If there isn't an application handy to test this out in, generate one using the +rails new+ command outside of the engine directory like this:
+Using an engine within an application is very easy. This section covers how to mount the engine into an application and the initial setup required for it, as well as linking the engine to a +User+ class provided by the application to provide ownership for posts and comments within the engine.
+
+h4. Mounting the engine
+
+First, the engine needs to be specified inside the application's +Gemfile+. If there isn't an application handy to test this out in, generate one using the +rails new+ command outside of the engine directory like this:
<shell>
$ rails new unicorn

0 comments on commit bb8ee92

Please sign in to comment.