ORDER
PER CURIAM.Brian Ernst appeals his conviction for indecency with a child. Ernst pled guilty pursuant to an agreed punishment recommendation. The trial court followed the recommendation and sentenced him to three-years imprisonment. Ernst challenges his conviction by the following three issues: (1) his constitutional right not to be prosecuted twice for the same offense was violated when the State re-indicted him for an offense that was the subject of a pretrial diversion agreement; (2) prosecution for the offense violated his right to due process; and (3) the State did not use due diligence in prosecuting him for the alleged violation of his pre-trial diversion agreement.
Background
After a grand jury indicted Ernst for indecency with a child, he entered into a pre-trial diversion agreement for a term of one year. Exactly one year and four days later, the State filed a notice of non-compliance, stating that Ernst had broken the terms of the agreement. Subsequently, the same allegations were brought before a different grand jury, which indicted Ernst for the same offenses that were the subject of the pre-trial diversion agreement.
Before trial, Ernst filed a motion to dismiss the indictment, arguing, inter alia, that he had “substantially completed the requirements” of his pre-trial diversion agreement. No order or other explicit ruling on the motion to dismiss appears in the record. Ernst then brought the issue to the trial court’s attention again, this time in a pre-trial application for writ of habeas corpus. The court held a hearing on the merits of the habeas application, at which time it entertained arguments by both Ernst and the State regarding the relief sought. Specifically, the trial court heard arguments as to whether the State could re-indict and prosecute Ernst for the *658same offenses that were the subject of the pre-trial diversion agreement. On the record, the trial court stated that it would consider the case law on the issue and review the parties’ briefs and rule on the habeas application by the end of the week. As with the motion to dismiss, however, no written order on the habeas application became part of the record. A docket sheet entry shows that the trial court denied the relief on the same day of the hearing on the merits, March 7, 2002.
On March 15, 2002, Ernst pled guilty pursuant to an agreed punishment recommendation. The trial court signed the judgment on April 30, 2002. Ernst filed a notice of appeal on May 8, 2002. On July 21, 2003, this Court abated Ernst’s appeal and ordered the trial court to supplement the record with a certification of Ernst’s right to appeal. See Tex.R.App. P. 25.2(a)(2). Pursuant to the order, the trial court supplemented the record with a certification indicating that this is a plea bargain case and that Ernst has no right of appeal.
Discussion
In relevant part, rule of appellate procedure 25.2(a)(2) states: “In a plea bargain case ... a defendant may appeal only: (A) those matters that were raised by written motion filed and ruled on before trial; or (B) after getting the trial court’s permission to appeal.” Id. In this case, which both parties agree is a plea bargain case, Ernst filed a motion to dismiss and a pretrial application for writ of habeas corpus. Both filings urged a common ground for terminating the case: the State could no longer prosecute Ernst for the charged offenses because he had completed his one-year diversion agreement before the second indictment was issued. The motion to dismiss was not ruled on expressly, but the application for writ of habeas corpus, which argued the same basis for relief as the motion, was denied by the trial court after the court considered the merits of the application.
We conclude that insofar as both the motion to dismiss and the application for habeas corpus urged the same ground for relief, the trial court’s ruling on Ernst’s habeas corpus application was an implicit ruling on his motion to dismiss. See Tex.R.App. P. 33.1(a)(2)(A); Well Solutions, Inc. v. Stafford, 32 S.W.3d 313, 316 (Tex. App.-San Antonio 2000, no pet.) (“A ruling is implicit if it is unexpressed but capable of being understood from something else.”); see also Sanchez v. Rodriguez, No. 13-00-059-CV, 2001 Tex.App. LEXIS 6783, at *10 (Corpus Christi October 4, 2001, pet. denied) (not designated for publication) (same). Thus, Ernst may appeal the matters raised in the motion to dismiss. See Tex.R.App. P. 25.2(a)(2)(A).
Response to the Dissent
The dissent would hold that Ernst has no right to appeal. It would dismiss Ernst’s appeal because the trial court did not issue a -writ or enter a written order denying Ernst’s pre-trial application for writ of habeas corpus. According to the dissent, Ernst cannot appeal the denial of his motion to dismiss under rule 25.2 as a “matter raised by written motion and ruled on before trial” because the trial court did not deny his habeas application in a written order that undertook to resolve the merits of his habeas claims as required by Hargett. Ex parte Hargett, 819 S.W.2d 866, 869 (Tex.Crim.App.1991) (holding that trial court ruled on the merits of a habeas application even though it never issued a writ). Holding a hearing on the merits of Ernst’s application and declaring that it would issue a ruling, the dissent contends, does not evidence the trial court’s intention to resolve the merits. *659Thus, for the dissent, the docket sheet entry showing that Ernst’s application for writ of habeas corpus was denied following the hearing on the merits is not enough to give Ernst a right to appeal the denial of his habeas application.
This is a conclusion with which we need not disagree. In fact, the dissent’s position is as perplexing as it is inapposite, given that we have not held that Ernst has a right to appeal the denial of his habeas application. Ernst has a right to appeal the denial of his motion to dismiss under rule 25.2 as a “matter raised by written motion and ruled on before trial.”
With all its talk of bridges and scaffolding, the dissent has lost itself in metaphors and obscured the legal basis for Ernst’s right to appeal. Before trial, Ernst filed a motion to dismiss in which he claimed that he could not be prosecuted because he had substantially completed the terms of his pre-trial diversion agreement. No express ruling on this motion appears in the record, and we can only assume that the trial court either ignored it or informally overruled it. Apparently in response, Ernst filed a pre-trial application for writ of ha-beas corpus in which he raised the same objection to the State’s case. The trial court did not ignore this filing. Rather, it held a hearing, at which time it entertained arguments from both sides on the merits of Ernst’s objections to prosecution. The court then denied the application. We have not held that Ernst has a right to appeal from this ruling. Instead, we have concluded that this ruling was also an implicit denial of Ernst’s motion to dismiss. In other words, if Ernst’s motion to dismiss had not been overruled by the time of the habeas hearing, it was certainly overruled when the court denied his habeas application.
Rule 25.2 allows a defendant in a plea bargain case to appeal matters raised by written motion and ruled on before trial. Tex.R.App. P. 25.2. It does not state that the ruling must be made by written order. See id. In fact, the rules of procedure specifically provide that a written order is not required to preserve a complaint for appeal. See Tex.R.App. P. 33.1(c). Furthermore, the ruling need not be express. See Tex.R.App. P. 33.1(a)(2)(A). A ruling that is neither written in an order nor expressly stated on the record can be appealed if it is implicit. See id.
Here, the trial court’s denial of Ernst’s motion to dismiss is implicit in its denial of his habeas application. It makes no difference that the ruling on his habeas application might not provide an independent basis for appeal, as the dissent argues. Hargett and its progeny are irrelevant to the issue of whether Ernst’s motion to dismiss was denied. Those cases deal with appeals from habeas proceedings. Not one of them discusses implied rulings on motions to dismiss, as we have in this case. Thus, the dissent’s lengthy discussion of why those cases establish that Ernst has no right to appeal is largely irrelevant. Ernst has a right to appeal because we construe the court’s denial of Ernst’s habeas application as a denial of Ernst’s motion to dismiss.
The dissent would hold that there is no such thing as an implicit ruling. The dissent would re-write rule 33.1 to say that a court can rule only by written order and that only express rulings can be appealed. However, it is not within the power of this Court to re-write the rules of appellate procedure. We must accept and apply the rules as promulgated.
Conclusion
For the foregoing reasons, we abate this appeal and order the trial court to amend the defective certification so that it shows that this “is a plea bargain case, but mat*660ters were raised by written motion filed and ruled on before trial and not withdrawn or waived, and the defendant has the right of appeal.” See Tex R.App. P. 44.4. We further order the trial court to forward the amended certification to this Court by means of a supplemental clerk’s record on or before June 9, 2004, or if the trial court is unable to comply by said date, to file a letter with the clerk of this Court stating when it can comply.
Dissent by Justice ERRLINDA CASTILLO.