method

compile_filter

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: ActionDispatch::Http::ParameterFilter
compile_filter() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/http/parameter_filter.rb, line 51
      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
Register or log in to add new notes.