
    James Ray JOHNSON; Terrence Sims; Heather Sims; Joslyn Johnson-Benning; Willie Benning; Richard Gaddes; Robert Hartenstein; Todd D. Severin; Hans P. Schroeder; Michael Bilich; Deb Hartenstein; Lance Goddard; Joan Goddard; Michael Moffett; Marian Moffett; James M. Ross; William Schneider; Valerie Schneider; Stephen Schneider, Plaintiffs-Appellees, v. Steven L. MYERS, DBA Myers Engineering International, Inc.; MYERS Engineering International Inc, Defendants-Appellants.
    No. 12-16428.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Feb. 13, 2014.
    Filed March 7, 2014.
    James Ray Johnson, for Plaintiffs-Ap-pellees.
    Stephan A. Barber, Daniel McKinnon, Ropers Majeski Kohn & Bentley, PC, San Jose, CA, Christopher Charles Cooke, Esquire, Jeffrey Kobrick, Cooke Kobrick & Wu LLP, San Mateo, CA, for Defendants-Appellants.
    Before: KOZINSKI, Chief Judge, and O’SCANNLAIN and MURGUIA, Circuit Judges.
   MEMORANDUM

James Johnson and eighteen other plaintiffs (collectively, “Johnson”) sued Steven Myers and Myers Engineering International, Inc. (collectively, “Myers”) for, among other things, breach of contract. The district court dismissed the original complaint and denied leave to file an amended complaint. Myers moved for an award of attorneys’ fees pursuant to California Civil Code § 1717, but the district court denied the motion on the ground that Myers was not the prevailing party. Myers appealed.

Under California law, the prevailing party is “the party who recovered a greater relief in the action on the contract.” Cal. Civil Code § 1717(b)(1). “[W]hen a defendant defeats recovery by the plaintiff on the only contract claim in the action, the defendant is the party prevailing on the contract under section 1717 as a matter of law.” Hsu v. Abbara, 9 Cal.4th 863, 39 Cal.Rptr.2d 824, 891 P.2d 804, 812 (1995). Because Myers ensured that Johnson would not recover on the breach of contract claim, the district court erred in refusing to rule that Myers was the prevailing party.

That the suit was dismissed based on pre-trial motions rather than litigated on the merits is irrelevant. See Profit Concepts Mgmt., Inc. v. Griffith, 162 Cal.App.4th 950, 76 Cal.Rptr.3d 396, 400 (2008); Elms v. Builders Disbursements, Inc., 232 Cal.App.3d 671, 283 Cal.Rptr. 515, 518 (1991). California case law does not suggest that, for these purposes, shareholder derivative suits are materially distinguishable from other cases. See Donner Mgmt. Co. v. Schaffer, 142 Cal.App.4th 1296, 48 Cal.Rptr.3d 534, 543 (2006).

REVERSED and REMANDED. 
      
       This disposition is not appropriate for publication and is not precedent except as provided by 9 th Cir. R. 36-3.
     