method
append_around_filter
v1.0.0 -
Show latest stable
- Class:
ActionController::Filters::ClassMethods
append_around_filter(*filters)public
The passed filters will have their before method appended to the array of filters that’s run both before actions on this controller are performed and have their after method prepended to the after actions. The filter objects must all respond to both before and after. So if you do append_around_filter A.new, B.new, the callstack will look like:
B#before A#before A#after B#after
1Note
around_filter code example
This is how it's used:
around_filter do |controller, action|
do_your(:stuff) do
action.call
end
end