Rails 3.1: Engine vs. Mountable App

前端 未结 5 1966

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:45

    The difference, I believe, is that a mountable app's are isolated from the host app, so they can't share classes - models, helper etc. This is because a Mountable app is a Rack endpoint (i.e a Rack app in its own right).

    Disclaimer: I have, like most, only just started toying with Rails 3.1.

提交回复
热议问题