method

append_around_filter

append_around_filter(*filters, &block)
public

If you append_around_filter A.new, B.new, the filter chain looks like

  B#before
    A#before
      # run the action
    A#after
  B#after

With around filters which yield to the action block, #before and #after are the code before and after the yield.

1Note

around_filter code example

mutru ยท Jul 4, 20082 thanks

This is how it's used:

around_filter do |controller, action|
do_your(:stuff) do
  action.call
end
end