我有一个cama_current_user
由 Gem Camaleon CMS提供的方法,它在 Gem 内部使用。现在我将这个 Gem 与我的应用程序一起使用,我需要通过执行类似这样的操作来覆盖方法“cama_current_user”,
def cama_current_user
@current_user
end
我已经在里面添加了这个方法ApplicationController
,ApplicationHelper
甚至添加了一个这样的新模块,
module CamaleonCms::SessionHelper
def cama_current_user
@current_user
end
end
但这些方法都没有在执行期间调用。那么如何覆盖 Gem 提供的现有方法定义。
任何建议将不胜感激。谢谢!