Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个可安装的引擎,我希望一些路由需要身份验证。我看到在我的引擎控制器内部我可以访问current_user(由 Devise 定义)。如何在我的主应用程序中创建这样的方法,并在引擎中访问它?基本上,我的引擎需要一个可定制的身份验证方法。
current_user