O'Reilly logo

Crafting Rails 4 Applications, 2nd Edition by José Valim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mountable and Isolated Engines

In Chapter 5, Streaming Server Events to Clients Asynchronously, we created a Rails engine that streams data to our application. In addition to providing a controller, the engine added new routes to our application, and helper methods like live_assets. In a way, that engine was directly extending our Rails application with its own components. However, this behavior is not always desirable.

Take for instance the plug-in we’ll build in this chapter. It’s going to provide its own models, controllers, and views. As the plug-in grows, the number of routes will start to multiply, as will the number of helper methods. If our plug-in implements a show_paginated_results helper and a Rails application uses our plugin, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required