
334 N.W.2d 728 (1983)
John SLATER and Patricia Slater, Appellants,
Jason John Slater and Jennifer Ann Slater, Minors by Patricia Slater, their mother and next friend, Intervenors-Appellants,
v.
FARMLAND MUTUAL INSURANCE COMPANY, Appellee,
Dwaine Baker, Steve Thayer, Richard Klein, Thomas Conveyor Company and Lavern Wroblewski, Defendants.
No. 68629.
Supreme Court of Iowa.
June 15, 1983.
Rehearing Denied July 14, 1983.
*729 Minor Barnes and Mathew G. Novak of Pickens, Barnes & Abernathy, Cedar Rapids and David M. Remley and J.A. Willems, of Remley, Heiserman & Willems, Anamosa, for appellants.
Lawrence E. Blades and Richard G. Hileman, Jr. of Simmons, Perrine, Albright & Elwood, Cedar Rapids, for appellee.
Considered by REYNOLDSON, C.J., and McGIVERIN, LARSON, SCHULTZ, and WOLLE, JJ.
LARSON, Justice.
Plaintiffs and intervenors (hereinafter referred to as plaintiffs) appeal from an adverse judgment of the district court granting defendant Farmland Insurance Company's motion for summary judgment. Farmland had moved for the summary judgment based on Iowa Code section 517.5 (1979), which provides immunity for insurance companies which perform safety inspections of any place of employment. The plaintiffs resisted the motion, claiming that section 517.5 violated the equal protection clauses of both the United States and Iowa Constitutions and that the statute did not protect insurance companies for negligent inspections which occurred before the effective date of the statute, even though the injury occurred after that date.
The district court sustained the motion based on the immunity of section 517.5, holding that the plaintiffs did not have "a vested or accrued cause of action" before the effective date of the statute, and therefore, the claim was barred. The court did not address the constitutional question. We granted interlocutory review.
On appeal the plaintiffs argue essentially the same position, that (1) section 517.5 violates the right to equal protection of the laws under the Iowa and federal constitutions; and (2) section 517.5 is prospective only, and that application of it to the present case would be to give it retrospective effect. We conclude that the statute applies in this case but do not decide the constitutional issue.

I. Background.

Plaintiff, John Slater, was an employee of the Clarence Cooperative in Stanwood. While working on March 12, 1979, he caught his right foot in a grain auger, and, *730 as a result, his leg had to be amputated. The defendant Farmland Insurance Company, as the cooperative's insurance carrier, had made safety inspections of the cooperative, but had not recommended that the auger be shielded. The present lawsuit was filed on March 5, 1981. After discovery, Farmland amended its answer to assert that section 517.5 constituted a complete defense to the plaintiffs' claims.
Section 517.5 became effective January 1, 1979, (before the accident) and provides:
No inspection of any place of employment made by insurance company inspectors shall be the basis for the imposition of civil liability upon the inspector or upon the insurance company employing the inspector; but this provision refers only to liability arising out of the making of an inspection and shall not be construed to deny or limit the liability of any employer to his employees or the liability of any insurance carrier on its insurance policy.

II. Application of Section 517.5.

The plaintiffs argue that section 517.5 was intended by the legislature to refer only to future inspections, that to allow it to absolve the defendant Farmland for its past negligent act is a prohibited retrospective application of the statute, and that the crucial time to determine whether the statute applies is the moment of the act of negligence, citing Schnebly v. St. Joseph Mercy Hospital, 166 N.W.2d 780, 784 (Iowa 1969). We disagree.
Fundamental to our tort law is that a cause of action accrues only when all the necessary elements have occurred. See, e.g., Giltner v. Stark, 252 N.W.2d 743, 745 (Iowa 1977); see also W. Prosser, Law of Torts § 30, at 143 (4th ed. 1971). In the present case, the injury did not occur until March 12, 1979, over two months after the effective date of section 517.5. Even if we assume, as the plaintiffs allege, that the defendant negligently inspected the cooperative before the effective date of the statute, the cause of action did not accrue until after the statute became effective. We have said: "There must be actual loss to the interest of another before a cause of action accrues. Generally, the wrong or negligence of the party charged gives in itself no right of action to anyone." Wolfswinkel v. Gesink, 180 N.W.2d 452, 456 (Iowa 1970); 65A C.J.S. Negligence § 175, at 306 (1966). In other words, a cause of action does not arise until the injury occurs. City of Ottumwa v. Nicholson, 161 Iowa 473, 479, 143 N.W. 439, 442 (1913); see also, 1 Am.Jur.2d Actions § 88, at 618 (1962).
Here, the injury, and thus the cause of action, did not accrue until after the immunity statute became effective.

III. Constitutional Challenge.

The plaintiffs argue that section 517.5 violates article I, section 6 of the Iowa constitution and the fourteenth amendment to the United States Constitution because it grants special immunities to insurance companies, for which there is "no valid public purpose or rational basis...." This issue was raised in the district court but was not ruled upon by the court. No request to the court for a ruling on this alternative argument appears to have been made. Under these circumstances, we will not address the issue. See Fjelland v. Wemhoff, 249 N.W.2d 634, 638 (Iowa 1977).
The judgment of the district court is affirmed.
AFFIRMED.
