Nearly 40 years ago, the all-male justices of the U.S. Supreme Court ruled that discrimination against pregnant women in determining eligibility for insurance and other benefits had nothing to do with gender. Congress soon rectified the injustice by passing a law that said pregnancy discrimination is indeed sex discrimination.

Now comes Iowa's so-called "irresistible worker" case, where an all-male state Supreme Court recently upheld a district court's summary judgment that a male dentist's firing of a female dental hygienist did not constitute sexual discrimination under Iowa law. The hygienist, Melissa Nelson, lost her job because James H. Knight's wife and pastor feared that his unrequited lust for the worker would ruin his marriage.

Obviously, Nelson's gender was a critical factor in the situation because Knight only lusted for women. But Iowa's highest court unanimously ruled that the firing did not violate antidiscrimination laws protecting classes of employees because it was "driven entirely by individual feelings and emotions regarding a specific person."

In Iowa, as in Minnesota and other states, employment is at-will. That means workers not under contract can be fired for any reason as long as no civil-rights or other violations occur. Iowa legislators are rightly considering adding to the state's civil-rights law to prevent additional ludicrous outcomes.

What about Minnesota? Had the case been heard here, would the outcome have been different? The answer isn't clear-cut, according to several state employment law attorneys and scholars contacted by an editorial writer. That's unsettling.

After years of hard-fought progress against workplace discrimination, Minnesota must not allow any erosion. Under Title VII of the federal Civil Rights Act of 1964, sex or gender discrimination is prohibited in the workplace. That means workers can't be treated differently based on gender when it comes to matters such as hiring, promotions and firing.

Sexual harassment is a type of gender discrimination that the Minnesota Human Rights Act says relates to conduct "that is sexual in nature, not simply gender-based," according to Marshall Tanick, an employment law attorney. "In Minnesota, the courts have construed the federal and state discrimination laws to include comments or behavior that have a 'sexual' element to it," he said.

Nelson's attorney wants the Iowa Supreme Court to rehear the case. Because she filed a sexual discrimination case under the state's civil-rights law and not Title VII, the case can't be appealed to a federal court. Nor did the attorney pursue a sexual-harassment case, though Knight, 53, sent worker Nelson, 32, sexually suggestive text messages, which his wife eventually discovered.

Six months before he fired Nelson, Knight texted that "if she saw his pants bulging, she would know her clothing was too revealing," court documents said. He asked how often she had orgasms. He said that if her husband wasn't interested in having sex with her, it was like "having a Lamborghini in the garage and never driving it."

Nelson thought the socially awkward dentist was going through a midlife crisis. Because she'd known Knight for years, first as her dentist, then for 10 years as her boss, she didn't take offense at his behavior. She says she never wore tight clothes but, because Knight insisted, wore a lab coat that covered her female form.

Iowa judges based their judgment, in part, on federal case law in which women were sexually intimate with their bosses. But the cases weren't comparable to Nelson's situation. She had no sexual interest in her boss, who admitted that she was a good employee. He behaved badly, then invoked his Christian faith to justify firing her in 2010. Now she works as a waitress.

In his opinion, Justice Edward Mansfield referred to Nelson as an "irresistible attraction." That disturbing description holds employees accountable for bosses who can't control their sexual urges. It's the same line of thinking some religions use to impose strict modesty standards on women, including face and body covering.

As a result of the court's ruling, workplace equality has taken a giant step backward in Iowa. Let's not let that happen in Minnesota.