显然这是一个已知的“问题”,但那里没有很多解决方案.问题是我有一个我想要全局访问的AuthenticationHelper – 但它不起作用.
我有read that you could add a few lines to your init.rb但它似乎没有任何影响.
init.rb
知道什么是在引擎中提供应用程序的最佳方法吗?
编辑:修正了 – 只需将代码(来自链接)放入engine.rb中.
config.to_prepare do ApplicationController.helper(MyEngineHelper) end