Submit information Documents - 401ChemistryGenealogy/ChemistryGenealogy GitHub Wiki

The submit information works in aggregated controller. It takes the parameters name, position, institution, postdoc, degree. The parameters postdoc and degree are in arrays whereas name, position, institution are in string. Controller first check if name exist in db and continue iff not found. If found then submit information will not provoke.

Example

Open rails console, then you can follow this example to see an information get created

First create postdoc and degree array

postdoc={pdStartYear: "1975", pdEndYear: "1978", pdInstitution: "University of Alberta", pdSupervisor: "John Doe"}
postdoc_array = [postdoc]
degree={year: "1978", type: "Doctorate", supervisor: "John Doe", institution: "University of Alberta"}
degree_array = [degree]

Then you need to create call the method for creating an information

Person.info_handling("Ji Hwan Kim", "Prof", "University of Alberta", postdoc_array, degree_array)

where info_handling takes in name, title, institution_name, postdoc_array, degree_array

Then afterward, go Person.all to see if the new person is added to db.