Junior Track Roadmap

Rails engines overview

Rails engines are Rails applications that can live inside another one. This course reads that pattern in gems an app already depends on: Turbo, Stimulus, Tailwind, Active Storage, Action Mailbox and Action Text. It covers isolate_namespace and what it isolates, engines with and without routes, the mount keyword, and the full versus mountable distinction. It also compares hand-written table naming with engine isolation, discusses when domain modules can stay plain namespaces, and traces one Active Storage request through an engine.

What you'll learn

  • ✓Spotting which gems in a dependency tree are Rails engines
  • ✓What isolate_namespace isolates and what stays shared
  • ✓How engines add routes with or without a mount call
  • ✓The difference between full and mountable engines
  • ✓When plain Ruby namespacing is enough and when an engine fits
Free preview · Lesson 1 3 min read

Thirteen engines already running in this app

The search matches fourteen gems in this project's dependency tree. One of them, railties, only matches because it defines Rails::Engine itself, in its documentation and in the template for new plugins. The other thirteen each define a class shaped class Engine < Rails::Engine. Turbo, Stimulus,…

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...