OPINION by
Chief Justice Hobson— Reversing.
In July, 1904, tlie Star Drilling Machine Company delivered to Geo. K. McLeod a portable drilling machine, which McLeod used in drilling oil wells ini Barren_ county. On October 17, 1904, creditors of McLeod brought suit in the Barren circuit court against him and took out attachments, which were levied on the drilling machine. Thereupon the Star Drilling Machine Company brought this suit, alleging that it was the owner of the property and took out an order of delivery for it. The written contract under which the machine was delivered to McLeod was filed as part of the petition. The court sustained the demurrer of the creditors to the petition of the Star Drilling Machine Company and entered judg*567ment in their favor. Prom this judgment the company appeals.
. The judgment of the court is based on the idea that the written contract between the company and McLeod constituted a sale of the property by it to' him. It is insisted for the company that the contract is not a sale, hut only an option, or offer to- sell, and-that' title to the property remained in the company, The written contract, so far as material, is in these words: “Memoradum of agreement, made in duplicate, this 16th day of July, 1904, by and between, the Star Drilling Machine Company of the city of Akron, county of Summit, and State of Ohio, party of the first, and George McLeod of city of Masontown, county of Fayette, and State of Pennsylvania, party of the second part: Witnesseth that the said first party has this day agreed to furnish to said second party, one No. 7 Star Portable Drilling Machine, oak frame, with 20 H. P. Oil Country Boiler, mounted, on its trucks, together with, the ropes and tools mentioned in the schedule hereto annexed, and made part hereof. The said first party agrees to load said machine on board cars at Akron, Ohio, for shipment; said second party agrees to receive the same upon its arrival at Glasgow, Kentucky, and to pay the freight and charges upon the same. The said party of the first part, warrants said machine to be of good materials, to be well made, and to do good work in drilling, pipe driving, or prospecting, if properly managed. It is agreed that said machine shall he furnished by said first party to the second party on a test trial of ten days, from its arrival at Glasgow, Kentucky, and that until the end of said test trial and until the complete fulfillment of the *568conditions of this agreement as herein set forth, that the title and possession of said machine shall remain vested in the party of the first part. At the end of said test trial, hereinbefore mentioned, the party of the second part agrees to accept said machine in the 'manner hereinafter set forth, provided the said machine shall have fulfilled the guarantee herein, and it is agreed that until said machine is accepted, a net rental of fifty cents per foot for the amount drilled shall he paid by the party of the second part to the party of the first part, hut that when accepted and all the conditions of the contract hereinafter set’ forth have been complied wlitli, the rental shall not he required. In consideration of the agreements hereinbefore set forth, the party of the second part agrees' to pay to the party of the first, twenty-four hundred ($2,400) dollars, in manner and form following, to wit: On receipt of a copy of this agreement, $500.00, and upon the acceptance of said machine to furnish the following promissory notes, drawn up in due form, and the payment thereof to be secured by chattel mortgage on machinery, boiler, ropes and tools. (Here follows schedule of notes to be executed). Said second party agrees to deliver, or mail said payments and notes promptly upon the completion of the test trial, and the acceptance of said machine. ’ ’
The plaintiff alleged in the petition that $500 was paid,, but charged that it was paid as rent, and that this was left out of the contract by oversight and mistake. It also alleged That McLeod had failed to execute the notes and mortgage referred to; that he had bored a number of wells, which, at fifty cents a foot, amounted to more than the sum he had paid it; *569that under the contract McLeod only held the machinery for the purpose of testing it, and that -he at the end of ten days decided to reject the plaintiff’s offer to -sell and did not accept it, and failed and refused to execute the notes and mortgage as provided in the contract; that McLeod had no rights in the property, other than to use it as. rented property, that at the end of ten days from the execution of the agreement plaintiff’s offer to sell lapsed, and was not open for acceptance after that time. The rule in this State is that whether a contract is a sale of property or a renting of it will be determined by the court from the substance of the writing taken as 'a whole, and not by the name which the parties may give the contract, or the form in which they may put it. If the writing had specified that the $500 w!as paid for the rent of the machine, this would not have changed its legal effect. The fact, therefore, that such a clause was omitted from the contract by oversight, or mistake, is immaterial, if the contract with such a clause in it would constitute a sale of the property,' for the fact that the parties stipulated that, the $500 should be treated as paid on rent would not be conclusive on the court, if from the whole contract it was clear it was paid as purchase money on a contract of sale. Baldwin & Co. v. Crow, 86 Ky., 679, 9 Ky. Law Rep., 836, 7 S. W., 146; Welch v. National Cash Register Co., 103 Ky., 30, 44 S. W., 124, 19 Ky. Law Rep., 1664; Wicks v. McConnell, 102 Ky., 434, 43 S. W., 205, 20 Ky. Law Rep., 84; Townsend v. Frazee, 54 S. W., 722, 21 Ky. Law Rep., 1183.
The substance of the contract is that the company guaranteed the machine to be of good material, to *570be well made, and to do good work if properly managed, and that it gave MfcLeod ten days after the arrival of the machine at Glasgow to test it, and at the end of that time McLeod wlas to accept the machine if it filled the guaranty and settle for it as provided in the contract. When after ten days’ trial McLeod continued to use the machine, he could not he heard to say that he had not accepted it. His failure to execute the notes and mortgage, as provided in the contract, did not affect his obligation. The company could at the end of the ten days have sued him for the balance of the purchase money and enforced a lien on the property. His continued use of the maóliinery, and its acquiescence in such use,' made it a complete contract of sale. The title to the machinery vested in McLeod, but subject to the lien of the company for the unpaid purchase money. His failure to-execute the notes and mortgage according to the contract put the company in no worse, position than if he had complied with it. As between the' company and McLeod, it is clear that it had a lien on the machinery for the unpaid balance ofithe price due from him. Its lien, though unrecorded, is good against subsequent attaching creditors. Baldwin v. Crow, 86 Ky., 679, 9 Ky. Law Rep., 836, 7 S. W., 146, and cases cited. The reasons for this rule are thus admirably stated by Judge- Simpson in Swigert v. Bank of Kentucky, 56 Ky., 290: “A general creditor, when he comes into a court of equity to obtain satisfaction of his debt out of the estate of the debtor, cannot, as a general rule, successfully assert any claim to his debtor’s property, unless, indeed, where a fraudulent disposition of it has been made, which the latter could not himself render *571available. If the -debtor have only an equitable interest in property, any lien or incumbrance on that equity, if not fraudulent, that would be valid against the debtor, will also be valid against the creditor in a court of equity. The creditor has only an equity on his debtor’s estate, and that equity does not exist until he commences his suit to subject some specific-part of the estate to the payment of his debt. This equity cannot prevail against an elder equity, for as between mere equities that which is prior in time is regarded as best, and takes precedence over any which may be subsequently created.” An attaching creditor can acquire no greater right in attached property than the attachment defendant has at the time of the attachment. He simply obtains by his attachment such rights as tlie debtor then had. Drake on Attachments, section 245. It follows, therefore, that the attaching creditors of McLeod obtained by their attachments only a lien on the machinery referred to, subject to the older equity of the drilling company.
The Circuit Court properly discharged the order of delivery and properly held that the drilling company was not the owner of the property, but he erred in sustaining the demurrer to the petition of. the drilling company and dismissing its action. Though the plaintiff had brought its action in ordinary, when it should have been in equity, the fact that the action was brought on the wrong docket was no reason for dismissing it. The facts stated in the petition being sufficient to show that the plaintiff was entitled to a lien on the property, the court under the prayer for proper relief might give the plaintiff such relief as the facts showed it was *572entitled to. The case of Herrman v. Whitescarver’s Adm’r, 89 Ky., 633, 10 Ky. Law Rep., 539, 13 S. W., 103, was tried on its merits. It was an action by the purchaser for the property, and wlas not so framed as to warrant the enforcement of a lien by him for what he had paid on the contract. Here, in any event, a sale must be ordered by the court. On the return of the ease the Circuit Court will transfer the action to- the equity docket and consolidate it with the attachment suits. He will then adjust the rights of the parties as the facts may warrant.
Judgment reversed, and cause remanded for further proceedings consistent herewith.
Petition for rehearing by appellee overruled.