method
after_filter
![Moderate documentation Importance_2](https://d2vfyqvduarcvs.cloudfront.net/images/importance_2.png?1349367920)
after_filter(*filters, &block)
public
Alias for #append_after_filter
Register or
log in
to add new notes.
lzap -
March 30, 2011 - (>= v3.0.0)
maciejkowalski -
February 9, 2012 - (<= v3.1.0)
![Default_avatar_30](https://www.gravatar.com/avatar/1a3cc3e60e9f6c21ac0f105b5d6c796c?default=http://apidock.com/images/default_avatar_30.png&size=30)
2 thanks
After filters are not called when exception occurs
Please note after filters are not executed when an exception occurs. You have to handle these situations explicitly.
![Default_avatar_30](https://www.gravatar.com/avatar/10f6b178261fa2542a81c64d8ad6699b?default=http://apidock.com/images/default_avatar_30.png&size=30)
1 thank
:only, :except and passing in multiple parameters
To specify that the filter should be applied to or excluded from given controller actions, use the :only and :except parameters. To pass in multiple controller actions use an array:
after_filter :authorize, :except => [:index, :show] after_filter :authorize, :only => :delete
Stolen from: http://apidock.com/rails/ActionController/Filters/ClassMethods/before_filter