Rails Publify 是如何将 Engine Mount 的?

extjs · 2017年10月20日 · 最后由 extjs 回复于 2017年10月20日 · 1069 次阅读

看了一下著名的 RoR 开源项目 Publify ( https://github.com/publify/publify ) 的源码,发现它把核心逻辑写在了 publify_core 的 engine 中。按照 Rails 文档,engine 需要在父项目中的 config/routes 中显式加载

mount Blorgh::Engine, at: "/blog"

然而 Publify 项目中的 config/routes 并没有写加载逻辑。请问它是如何加载 engine 的?

明白了,原来 Full Engine 是不需要显式加载的

需要 登录 后方可回复, 如果你还没有账号请 注册新账号