class ActionView::Helpers::FormBuilder

def fields(scope = nil, model: nil, **options, &block)

See the docs for the ActionView::Helpers::FormHelper#fields helper method.
def fields(scope = nil, model: nil, **options, &block)
  options[:allow_method_names_outside_object] = true
  options[:skip_default_ids] = !FormHelper.form_with_generates_ids
  convert_to_legacy_options(options)
  fields_for(scope || model, model, options, &block)
end