src/containers/Form.js
function assembleAttrsFromServer(seedData, formObjectClass) {
  // Early return when there was no serialized object provided by the server
  if (!seedData) { return {} }

  // Otherwise assemble main and submodels' fields
  let attrs = merge({}, seedData.fields, seedData.errors)
  // TODO: reenable this, but consider there might be ids/ id arrays in there
  // for (let submodel of formObjectClass.submodels) {
  //   if (seedData.fields[submodel]) {
  //     let submodelData = seedData.fields[submodel]
  //     attrs[submodel] = merge({}, submodelData.fields, submodelData.errors)
  //   }
  // }
  return attrs
}
function assembleAttrsFromServer(seedData, formObjectClass) {
  // Early return when there was no serialized object provided by the server
  if (!seedData) { return {} }

  // Otherwise assemble main and submodels' fields
  let attrs = merge({}, seedData.fields, seedData.errors)
  // TODO: reenable this, but consider there might be ids/ id arrays in there
  // for (let submodel of formObjectClass.submodels) {
  //   if (seedData.fields[submodel]) {
  //     let submodelData = seedData.fields[submodel]
  //     attrs[submodel] = merge({}, submodelData.fields, submodelData.errors)
  //   }
  // }
  return attrs
}
function assembleAttrsFromServer ( seedData , formObjectClass ) { // Early return when there was no serialized object provided by the server if ( ! seedData ) { return { } } // Otherwise assemble main and submodels' fields let attrs = merge ( { } , seedData . fields , seedData . errors ) // TODO: reenable this, but consider there might be ids/ id arrays in there // for (let submodel of formObjectClass.submodels) { //   if (seedData.fields[submodel]) { //     let submodelData = seedData.fields[submodel] //     attrs[submodel] = merge({}, submodelData.fields, submodelData.errors) //   } // } return attrs }
the values we want from the server-provided serialized object are nested under `fields`. The same is true for included submodels.
the values we want from the server - provided serialized object are nested under fields . The same is true for included submodels .