Can you restric before_filter to specific actions? -- Posted via http://www.ruby-forum.com/.
:only http://api.rubyonrails.com/classes/ActionController/Filters/ClassMethods.html#M000152 Joe -- Posted via http://www.ruby-forum.com/.
Doodles Malone
2006-Jul-26 21:53 UTC
[Rails] Re: Restricting before_filter to certain actions?
before_filter :some_filter_method, :only => [ :action1, :action2 ] before_filter :another_filter_method, :except => [ :action3, :action 4 ] "Chris" <cadams1342@hotmail.com> wrote in message news:5c03a4df2021a9cee5d6180ef9376c0a@ruby-forum.com...> Can you restric before_filter to specific actions? > > -- > Posted via http://www.ruby-forum.com/.
> Can you restric before_filter to specific actions?Yep. before_filter :something, :only => [ :your_action ]
Jordan Elver wrote:>> Can you restric before_filter to specific actions? > > Yep. before_filter :something, :only => [ :your_action ]and there''s also :except=> e.g. before_filter :authorise, :except => [:warning, :closed] --John -- Posted via http://www.ruby-forum.com/.