class ActionController::Parameters

def initialize(parameters = {}, logging_context = {})

Person.new(params) # => #
params.permitted? # => true
params = ActionController::Parameters.new(name: "Francesco")

ActionController::Parameters.permit_all_parameters = true

Person.new(params) # => ActiveModel::ForbiddenAttributesError
params.permitted? # => false
params = ActionController::Parameters.new(name: "Francesco")

end
class Person < ActiveRecord::Base

ActionController::Parameters.permit_all_parameters.
Also, sets the +permitted+ attribute to the default value of
Returns a new +ActionController::Parameters+ instance.
def initialize(parameters = {}, logging_context = {})
  parameters.each_key do |key|
    unless key.is_a?(String) || key.is_a?(Symbol)
      raise InvalidParameterKey, "all keys must be Strings or Symbols, got: #{key.class}"
    end
  end
  @parameters = parameters.with_indifferent_access
  @logging_context = logging_context
  @permitted = self.class.permit_all_parameters
end