depends what kind of ruling.
if a court interprets an ordinary statute passed by the Legislature, the Legislaure can amend the statute if it diasagrees with the Court’s interpretation.
harder to do if it’s a court ruling interpreting the Constitution. The Legislature can’t change that by an ordinary statute, but it (or the people, if the constitution in question has that as an option), can try to amend the constitution by a constitutional amendment.
that’s what Prop 8 is - a popular initiative to amend the California state constitution to define marriage as between a man and a woman only, overturning the decision of the California Supreme Court last spring, which held that denying same-sex marriage was a breach of the state constitution.
The people of California passed Proposition 22 which created a state statute defining marriage as being a man and woman only.
Then, the mayor of San Francisco got the idea that Prop 22 was unconstitutional in that it violated the equal protection clause of the state constitution. He started issuing marriage licenses to same sex couples. The SF mayor also runs the “county” of San Francisco, as San Francisco city and county are one in the same.
Some right wing groups sued the mayor to stop the SSMs. The state Supreme Court held the mayor did not have the power to issue SSM licenses in violation of state statute (Prop 22). The court left the question open about the constitutionality of Prop 22.
The state legislature passed a bill purporting to legalize SSM. However, the legislature cannot undo an initiative (Prop 22) by a legislative act, and everyone knew it was a symbolic gesture only.
Arnold vetoed the bill arguing that the bill was either unconstitutional or unnecessary. The bill would be unconstitutional in that the bill purported to undo an initiative. That argument assumed Prop 22 was constitutional, which the court had yet to decide. If the court struck Prop 22 as unconstitutional, then the bill would be unnecessary in that the court will have done exactly what the court did… recognize SSM as a matter of law.
Later, the court struck 22 and some folks got together to start another initiative to amend the state constitution to define marriage as one man and one woman, attempting to trump the court.