Starting in the 1960s, California became a leader in family law. California was the first state to allow true no-fault divorce, with the passage of the Family Law Act of 1969. In 1994, the Legislature took family law out of the Civil Code and created a new Family Code. In 2002, the Legislature granted registered domestic partners the same rights under state law as married spouses. In 2008 California became the second state to legalize same-sex marriage when the California Supreme Court ruled the ban unconstitutional.