protected Method

ClassMethods.find_or_create_filter(filter, filter_type)

There's no documentation for this item.

Source Code

# File action_controller/filters.rb, line 560
def find_or_create_filter(filter, filter_type)
  if found_filter = find_filter(filter) { |f| f.type == filter_type }
    found_filter
  else
    f = class_for_filter(filter, filter_type).new(filter)
    # apply proxy to filter if necessary
    case filter_type
    when :before
      BeforeFilterProxy.new(f)
    when :after
      AfterFilterProxy.new(f)
    else
      f
    end
  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.