Rails engines
suggest changeVersions
Rails 4.2
Introduction
Engines are miniature applications that add functionality to a host application. A Rails application is a “supercharged” engine: Rails::Application inherits much of its behavior from Rails::Engine.
An engine is packaged like a gem. Devise and Spree are engines, and both can be mounted in a Rails application.
Syntax
rails plugin new [engine name] --mountable
Parameters
| Parameter | Purpose |
|---|---|
--mountable |
Create a mountable, namespace-isolated engine |
--full |
Create an engine with the fuller skeleton structure |
Remarks
Engines are a solid way to build a reusable plugin for a Rails application. The flag is --mountable, with two hyphens.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents