lib/tasks/fix_maine_nil_counties.rake
def people
      people_1_ids = Person.all.where(:addresses.exists => true, :"addresses.county".in => [nil, "", "Zip code outside supported area"]).map(&:_id)
      # benefitmarkets because previously we erroneously assigned a object instead of ring to county
      people_2_ids = Person.where("addresses.county" => /.*benefitmarkets.*/i).map(&:_id)
      people_ids = (people_1_ids + people_2_ids).flatten
      Person.where(:"_id".in => people_ids)
    end
# - find families missing county
# - update county for single county
# - list the county with nil county with zip outside ME
# - application county update
find families missing county
update county for single county
list the county with nil county with zip outside ME
application county update
find families missing county update county for single county list the county with nil county with zip outside ME application county update
def people
      people_1_ids = Person.all.where(:addresses.exists => true, :"addresses.county".in => [nil, "", "Zip code outside supported area"]).map(&:_id)
      people_2_ids = Person.where("addresses.county" => /.*benefitmarkets.*/i).map(&:_id)
      people_ids = (people_1_ids + people_2_ids).flatten
      Person.where(:"_id".in => people_ids)
    end
def people people_1_ids = Person . all . where ( :addresses . exists => true , :" addresses.county " . in => [ nil , "" , "Zip code outside supported area" ] ) . map ( & :_id ) people_2_ids = Person . where ( "addresses.county" => / .*benefitmarkets.* /i ) . map ( & :_id ) people_ids = ( people_1_ids + people_2_ids ) . flatten Person . where ( :" _id " . in => people_ids ) end
find families missing county
 update county for single county
 list the county with nil county with zip outside ME
 application county update
find families missing county update county for single county list the county with nil county with zip outside ME application county update
# benefitmarkets because previously we erroneously assigned a object instead of ring to county