Find a filter in the filter_chain where the filter method matches the filter param and (optionally) the passed block evaluates to true (mostly used for testing before? and after? on the filter). Useful for symbol filters.
The object of type Filter is passed to the block when yielded, not the filter itself.
Source Code
# File action_controller/filters.rb, line 378 def find_filter(filter, &block) #:nodoc: filter_chain.select { |f| f.filter == filter && (!block_given? || yield(f)) }.first end
<code/>and<pre/>for code samples.