Rails 3.1: Engine vs. Mountable App

前端 未结 5 1971

Can someone help me understand the differences between a Rails Engine and a Mountable app? In Rails 3.1, you can create either one with the \"rails new plugin _

5条回答
  •  庸人自扰
    2020-11-27 09:46

    My understanding of the difference is that engines are like plugins, and add functionality to existing applications. While mountable apps are essentially an application, and can stand alone.

    So if you want to be able to run it by itself or within another application you would make a mountable app. If you intend for it to be an addition to existing applications, but not run by itself you would make it an engine.

提交回复
热议问题