method

hash_filter

Importance_0
hash_filter(params, filter, on_unpermitted: self.class.action_on_unpermitted_parameters, explicit_arrays: false) 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_controller/metal/strong_parameters.rb, line 1352
      def hash_filter(params, filter, on_unpermitted: self.class.action_on_unpermitted_parameters, explicit_arrays: false)
        filter = filter.with_indifferent_access

        # Slicing filters out non-declared keys.
        slice(*filter.keys).each do |key, value|
          next unless value
          next unless has_key? key
          result = permit_value(value, filter[key], on_unpermitted,, explicit_arrays))
          params[key] = result unless result.nil?
        end
      end
Register or log in to add new notes.