1
我装修的helper方法在另一个引擎:使用装饰辅助方法,在相同的发动机
Backend::PathHelper.module_eval do
def spent_appable_points_path(paramz = {})
send("spent_#{appable_type}_points_path", appable, paramz)
end
def earned_appable_points_path(paramz = {})
send("earned_#{appable_type}_points_path", appable, paramz)
end
end
使用我的后台引擎意见里面这两种方法工作正常。但是当我尝试在同一个引擎中使用这两种方法时,我正在装饰它们,但它们不可用。
Backend::PathHelper.public_instance_methods # doesn't return them
什么适当的DRY方式能够在同一个引擎中使用这两种方法?