
147 Cal.App.2d 172 (1956)
MITCHELL F. INSOLO et al., Appellants,
v.
IMPERIAL IRRIGATION DISTRICT, Respondent.
Civ. No. 5294. 
California Court of Appeals. Fourth Dist.  
Dec. 21, 1956.
 Best, Best & Krieger and Arthur L. Littleworth for Appellants.
 Horton & Knox for Respondent. *173
 BARNARD, P. J.
 This is an appeal from a judgment of nonsuit. The action was one to enjoin an alleged nuisance and for damages. The plaintiffs alleged in their complaint that the defendant district had erected and installed adjacent to plaintiffs' property, certain electrical equipment which emitted a continuous loud humming noise which greatly diminished the value of plaintiffs' property. It was further alleged that on or about July 15, 1953 "a verified claim was presented to the Imperial Irrigation District by the plaintiffs herein," stating the facts upon which the claim was based. The original answer filed by the district contained, among other things, Paragraph IV, which reads: "Admits that on or about July 15th, 1953, plaintiffs filed a verified claim to which reference is made for the contents thereof." The clerk's transcript does not show the verification of this answer but it is stated by the appellants, and not denied by the respondent, that this answer was verified by the secretary of the district, Mr. Mathis, who swore that he was authorized to make the verification on behalf of the district, that he had read the answer and knew its contents, and that the facts stated therein were true of his own knowledge.
 Thereafter, Mr. Mathis died and about a year and a half after the original answer had been filed the district moved for permission to amend its answer by striking therefrom Paragraph IV, and substituting a new Paragraph IV, on the ground that it was ambiguous and that by inadvertence the defendant had neglected to deny that a verified claim was served or filed in accordance with section 22727 of the Water Code. Permission to do this was given and the answer was amended so that the new Paragraph IV reads:
 "Admits that on or about July 15th, 1953, the operating headquarters of Imperial Irrigation District, at Imperial, California, received by registered United States mail a document purporting to be the verified claim referred to in paragraph VIII of plaintiffs' complaint. Reference is made to said document for the contents thereof. Denies that a verified claim for damages was presented and/or filed as required by Water Code Section 22727."
 At the trial of the case the plaintiffs introduced considerable evidence concerning the filing of their verified claim, and the claim itself was admitted as an exhibit. At the conclusion of plaintiffs' case the district moved for a nonsuit on the grounds that no cause of action had been proved, and that the plaintiffs had failed to prove that a verified claim was *174 presented, filed, served or received by the secretary of the district as required by section 22727 of the Water Code. The court denied the motion on the ground that no cause of action had been proved, but granted it on the ground "that no proper presentation or service was made under Section 22727 of the Water Code." A judgment for nonsuit was then entered, from which the plaintiffs have appealed.
 No question is raised about the validity of the claim itself, its contents or its verification. The only question raised is as to whether the evidence produced was sufficient to show a substantial compliance on the part of the appellants with the requirement of section 22727 that a verified claim shall be presented in writing and served on the secretary of the district. [1] In passing upon this question, where a nonsuit has been granted, the plaintiff must be given the benefit of every piece of evidence which tends to sustain his averments, any inferences or presumptions which might reasonably be drawn are to be drawn in his favor, and in all respects the court must view the evidence in the light most favorable to the plaintiff. (Bosqui v. City of San Bernardino, 2 Cal.2d 747 [43 P.2d 547].)
 [2a] It appears from the evidence here that the attorney for the appellants sent this verified claim by registered mail to Imperial Irrigation District, and that he requested and received a registered return receipt. The original answer admits that a verified claim was filed and the amended answer admits that the operating headquarters of the district at Imperial, California, received by registered mail a verified claim but denies that it was presented or filed as required by the Water Code. The return receipt for the claim was signed by a clerk in the mailing department of the office of the district. She testified that she generally signed for registered mail, that it was the function of her department to open the mail and "distribute it to whomever it is concerned with," and that on other occasions she had seen letters making claims for damages and such letters were sent to the business manager, Mr. Jefferies. The attorney for the plaintiffs testified that he had personally investigated the filing of the claim; that he went to El Centro and talked to Mr. Jefferies, the business manager of the district; and that Mr. Jefferies stated that he remembered receiving this claim and that he gave it to Mr. Mathis, who was then secretary of the district. On cross-examination, he testified that Mr. Jefferies did not say that he had delivered the claim to the secretary personally, but did *175 say that he sent it to the secretary. Apparently, the secretary of the district, in verifying the original answer, affirmed to the truth of the statement therein that a verified claim was filed on or about July 15, 1953.
 [3] It is well settled that a substantial compliance with the requirement of statutes providing for the filing of such claims is all that is required. (Knight v. City of Los Angeles, 26 Cal.2d 764 [160 P.2d 779], and cases there cited.) In such cases the courts look to see if the purpose of the statute has been satisfied, whether there has been a bona fide attempt to comply with the statute, and whether any prejudice to the other party appears. (Natural Soda Products Co. v. City of Los Angeles, 23 Cal.2d 193 [143 P.2d 12]; Sandstoe v. Atchison, T. & S. F. Ry. Co., 28 Cal.App.2d 215 [82 P.2d 216]; Cruise v. City & County of San Francisco, 101 Cal.App.2d 558 [225 P.2d 988]; Uttley v. City of Santa Ana, 136 Cal.App. 23 [28 P.2d 377].)
 The respondent concedes that substantial compliance with the terms of claim statutes is all that is required by recent decisions, but argues that in each of the cases so holding it appears that the governing body considered and acted upon the claim in question, and that no such evidence here appears. The fact that the claim was actually acted upon does not appear in all of the cases where it has been held that there has been a substantial compliance with the statute. [4] Under the authorities, the controlling fact is what the claimant has done in filing or attempting to file the claim, and not whether or not the public body has had actual knowledge or has acted upon the claim. If the rule were otherwise, the public body could defeat any "substantial compliance" by failing to act on the matter.
 [2b] Under the authorities cited, and many others, it must be held that a substantial compliance with section 22727 of the Water Code was sufficiently shown by the evidence to make it improper to grant a motion for a nonsuit.
 It is unnecessary to consider the further question raised as to whether or not the filing of a claim was required in this action for an injunction, because of the absence of certain allegations in the complaint.
 The judgment is reversed.
 Griffin, J., and Mussell, J., concurred.
