Affirmative action ruling could impact gay marriage fight