aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2011-10-15 09:51:30 +1100
committerRyan Bigg <radarlistener@gmail.com>2011-10-16 20:17:53 +1100
commitbb8ee9264f8302ea9f669c96f46d9c3812d6f350 (patch)
treea51b3c0c82045c14e52123ead95b21d95f1729f9
parentabf4f096e56a941ac4f908cb34c83bc82770ed56 (diff)
downloadrails-bb8ee9264f8302ea9f669c96f46d9c3812d6f350.tar.gz
rails-bb8ee9264f8302ea9f669c96f46d9c3812d6f350.tar.bz2
rails-bb8ee9264f8302ea9f669c96f46d9c3812d6f350.zip
[engines guide] improve intro to 'Hooking into an application' section
-rw-r--r--railties/guides/source/engines.textile8
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/guides/source/engines.textile b/railties/guides/source/engines.textile
index 126d09ab87..4f77852c40 100644
--- a/railties/guides/source/engines.textile
+++ b/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