Flowdock
method

check_param_encoding

Importance_0
v5.0.0.1 - Show latest stable - 0 notes - Class: Utils
check_param_encoding(params) public

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/request/utils.rb, line 16
      def self.check_param_encoding(params)
        case params
        when Array
          params.each { |element| check_param_encoding(element) }
        when Hash
          params.each_value { |value| check_param_encoding(value) }
        when String
          unless params.valid_encoding?
            # Raise Rack::Utils::InvalidParameterError for consistency with Rack.
            # ActionDispatch::Request#GET will re-raise as a BadRequest error.
            raise Rack::Utils::InvalidParameterError, "Non UTF-8 value: #{params}"
          end
        end
      end
Register or log in to add new notes.