diff options
author | Robert Ross <robert@maintainedauto.com> | 2011-10-04 23:42:50 -0700 |
---|---|---|
committer | Robert Ross <robert@maintainedauto.com> | 2011-10-04 23:42:50 -0700 |
commit | 463223c32445c535225fe0f134b854334c5649cc (patch) | |
tree | 045cedf92340899cd7654ad4b5794ef3a6e4a98e /railties | |
parent | ac49fb1aa92ac9f65e009eec2bb22f730f8c37f5 (diff) | |
parent | 2c4e08d872869b116d2558256f8daeb0815a6dc0 (diff) | |
download | rails-463223c32445c535225fe0f134b854334c5649cc.tar.gz rails-463223c32445c535225fe0f134b854334c5649cc.tar.bz2 rails-463223c32445c535225fe0f134b854334c5649cc.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/engines.textile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/railties/guides/source/engines.textile b/railties/guides/source/engines.textile new file mode 100644 index 0000000000..dc87ac4095 --- /dev/null +++ b/railties/guides/source/engines.textile @@ -0,0 +1,36 @@ +h2. Getting Started with Engines + +In this guide you will learn about engines and how they can be used to provide additional functionality to their host applications through a clean and very easy-to-use interface. You will learn the following things in this guide: + +* What are engines +* Generating an engine +* Building features for the engine +* Hooking the engine into an application +* Overriding engine functionality in the application + +endprologue. + +h3. What are engines? + +Engines can be considered miniature applications that provide functionality to their host applications. A Rails application is actually just a "supercharged" engine, with the `Rails::Application` class inheriting from `Rails::Engine`. Therefore, engines and applications share common functionality but are at the same time two separate beasts. + +h3. Generating an engine + +TODO: The engine that will be generated for this guide will be called "blorgh". It's a blogging engine that provides posts and comments and that's it. + +TODO: Describe here the process of generating an engine and what an engine comes with. + +h3. Providing engine functionality + +TODO: Brief explanation of what this engine is going to be doing and what we will have once we are done. +TODO: Generate a posts scaffold (maybe?) for the engine +TODO: Generate a comments scaffold (maybe?) for the engine + +h3. Hooking into application + +TODO: Application will provide a User foundation class which the engine hooks into through a configuration setting, configurable in the application's initializers. The engine will be mounted at the +/blog+ path in the application. + +h3. Overriding engine functionality + +TODO: Cover how to override engine functionality in the engine, such as controllers and views. +IDEA: I like Devise's +devise :controllers => { "sessions" => "sessions" }+ idea. Perhaps we could incorporate that into the guide?
\ No newline at end of file |