public Method

ClassMethods.prepend_around_filter(*filters, &block)

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

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

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

Source Code

# File action_controller/filters.rb, line 306
def prepend_around_filter(*filters, &block)
  filters, conditions = extract_conditions(filters, &block)
  filters.map { |f| proxy_before_and_after_filter(f) }.each do |filter|
    prepend_filter_to_chain([filter, conditions])
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.