首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

rails的before_filter,如若except子controller中的action skip_filter

2012-12-20 
rails的before_filter,如果except子controller中的actionskip_filter如题,在http://stackoverflow.com/que

rails的before_filter,如果except子controller中的action skip_filter

如题,在http://stackoverflow.com/questions/2390178/skip-before-filter-in-rails 找到了答案。

?

问:

I have three controllers: dog, cat, and horse.These controllers all inherit from the controller animal.In the controller animal, I have a before filter that authenticates a user as such:

? class Dog < Animal skip_before_filter :authenticateend

??

See ActionController::Filters::ClassMethods for more info on filters and inheritance.