instance method compile_filter

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v3.2.22.5 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

compile_filter()

No documentation comment.

Source
# File actionpack/lib/action_dispatch/http/parameter_filter.rb, line 53
      def compile_filter
        strings, regexps, blocks = [], [], []

        @filters.each do |item|
          case item
          when NilClass
          when Proc
            blocks << item
          when Regexp
            regexps << item
          else
            strings << item.to_s
          end
        end

        regexps << Regexp.new(strings.join('|'), true) unless strings.empty?
        [regexps, blocks]
      end

Defined in actionpack/lib/action_dispatch/http/parameter_filter.rb line 53 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionDispatch::Http::ParameterFilter

Type at least 2 characters to search.

↑↓ navigate · open · esc close