Ruby on rails 带有装饰器的rails DefineryCMS扩展控制器不工作
我正在尝试使用in-decorator方法扩展refinerycms gem的用户控制器 这是我的decorator/controllers/refindery/user\u controller\u decorator.rb代码Ruby on rails 带有装饰器的rails DefineryCMS扩展控制器不工作,ruby-on-rails,refinerycms,Ruby On Rails,Refinerycms,我正在尝试使用in-decorator方法扩展refinerycms gem的用户控制器 这是我的decorator/controllers/refindery/user\u controller\u decorator.rb代码 Refinery::usersController.class_eval do before_filter :myfunc, :only => [:home,:new, :create, :sign_in, :sign_out ] def m
Refinery::usersController.class_eval do
before_filter :myfunc, :only => [:home,:new, :create, :sign_in, :sign_out ]
def myfunc
abort('this is it')
end
end
提前感谢你是说带大写U的Refinery::UsersController吗?是的,我已经从small U更改为capital U,但仍然不是luckAlso,文件应该在app/decorators/controllers/Refinery/users\U controller\U decorator.rbI通过清除tmp缓存解决了这个问题: