Rails Publify 是如何将 Engine Mount 的?

extjs · October 20, 2017 · Last by extjs replied at October 20, 2017 · 1070 hits

看了一下著名的 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 是不需要显式加载的

You need to Sign in before reply, if you don't have an account, please Sign up first.