app/data_migrations/golden_seed_helper.rb
def create_and_return_family(case_info_hash = {})
    family = Family.new
    family.person_id = case_info_hash[:primary_person_record].id
    fm = family.family_members.build(
      person_id: case_info_hash[:primary_person_record].id,
      is_primary_applicant: case_info_hash[:person_attributes]['relationship_to_primary'].downcase == 'self'
    )
    fm.save
    family.save
    family
  end
# TODO: Need to figure out the primary applicant thing on spreadsheet
Need to figure out the primary applicant thing on spreadsheet
Need to figure out the primary applicant thing on spreadsheet
def create_and_return_family(case_info_hash = {})
    family = Family.new
    family.person_id = case_info_hash[:primary_person_record].id
    fm = family.family_members.build(
      person_id: case_info_hash[:primary_person_record].id,
      is_primary_applicant: case_info_hash[:person_attributes]['relationship_to_primary'].downcase == 'self'
    )
    fm.save
    family.save
    family
  end
def create_and_return_family ( case_info_hash = { } ) family = Family . new family . person_id = case_info_hash [ :primary_person_record ] . id fm = family . family_members . build ( person_id : case_info_hash [ :primary_person_record ] . id , is_primary_applicant : case_info_hash [ :person_attributes ] [ 'relationship_to_primary' ] . downcase == 'self' ) fm . save family . save family end
TODO: Need to figure out the primary applicant thing on spreadsheet
TODO : Need to figure out the primary applicant thing on spreadsheet
case_info_hash