Restricting before_filter to certain actions?

Can you restric before_filter to specific actions?

:only

http://api.rubyonrails.com/classes/ActionController/Filters/ClassMethods.html#M000152

Joe

Can you restric before_filter to specific actions?

Yep. before_filter :something, :only => [ :your_action ]

Jordan E. 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

Hi All,
I am playing with ActionMailer.receive(mail).
Is there any way to identify whether the received email is “out of
office, autoreply” mail.

Your reply is appreciated!
_jon

before_filter :some_filter_method, :only => [ :action1, :action2 ]

before_filter :another_filter_method, :except => [ :action3, :action 4 ]

“Chris” [email protected] wrote in
message news:[email protected]