Penal Code section 1238, subdivision (a)(8) authorizes the prosecution to appeal the trial court’s dismissal of a case after receiving an adverse ruling on a pretrial motion, and thereby obtain review of the pretrial ruling. If an appeal is brought under this section and the prosecution is unsuccessful, it is prohibited from refiling the case appealed. Here, defendant was charged with violation of Government Code section 1090, which prohibits a council member from being financially interested in any contract made by her in her official capacity. Ruling on an in limine motion the trial court permitted introduction of the defense of entrapment by estoppel, i.e., that the defendant had relied on the advice of the city attorney to enter into the contract. Believing it could not proceed, the prosecution moved to dismiss the case and then, pursuant to section 1238, subdivision (a)(8) appealed the ruling on the motion and the dismissal. The appellate court reached the merits of the in limine ruling and determining that the city attorney did not have the power to bind the state to an erroneous interpretation of the conflict statute, reversed the dismissal and directed the estoppel evidence excluded. On review, the Supreme Court found that the appellate court properly relied on section 1238, subdivision (a)(8) to reach the underlying issue presented in the pretrial ruling. Affirming the appellate decision, the Supreme Court refused to permit a broad application of the entrapment by estoppel defense and declined to extend it to public officials who seek to defend conflict of interest accusations by claiming reliance on the advice of public attorneys who counsel and advocate on their behalf.