In cases where the spouse, except for the marriage relation, would not be a necessary party, a married person may sue and be sued as if unmarried and without joining the spouse. If a person marries and at the same time takes a new name while a party to a pending action, the person shall thereafter be designated by the new name.