Method: ActionController::Parameters#each_pair

Defined in:
lib/action_controller/metal/strong_parameters.rb

#each_pair(&block) ⇒ Object Also known as: each

Convert all hashes in values into parameters, then yield each pair in the same way as ‘Hash#each_pair`.



402
403
404
405
406
407
408
409
# File 'lib/action_controller/metal/strong_parameters.rb', line 402

def each_pair(&block)
  return to_enum(__callee__) unless block_given?
  @parameters.each_pair do |key, value|
    yield [key, convert_hashes_to_parameters(key, value)]
  end

  self
end