
226 N.W.2d 829 (1975)
STATE of Iowa, Appellee,
v.
Diane GREENE, Appellant.
No. 57233.
Supreme Court of Iowa.
March 19, 1975.
*830 L. Vern Robinson, Iowa City, for appellant.
Richard C. Turner, Atty. Gen., Nancy J. Shimanek, Asst. Atty. Gen., Carl Goetz, County Atty., for appellee.
Heard before MOORE, C. J., and MASON, REES, UHLENHOPP and REYNOLDSON, JJ.
MASON, Justice.
Diane Greene was charged by county attorney's information with delivery of a schedule I controlled substance in violation of section 204.401(1), The Code, 1973. Following arraignment, confirmation of court appointed counsel and a plea of not guilty defendant filed various motions including a motion to suppress and at least two motions for continuance. Later she withdrew her previous plea of not guilty and tendered a plea of guilty to the crime of delivery of a controlled substance, the delivery being stipulated to be an accommodation sale, which the court accepted.
The guilty plea resulted from a plea bargaining agreement entered into by defendant's court appointed attorney and the Johnson county attorney. The agreement stipulated the offense charged was factually one of accommodation and that there would be no fine imposed but the length of sentence would be left up to the court. The county attorney recommended the court impose a six month sentence.
After examination of defendant, the court sentenced defendant to six months imprisonment in the Johnson county jail, but, pursuant to section 245.4, The Code, provided such commitment be at the Iowa State Reformatory for Women at Rockwell City.
It appears from the minutes of testimony that on August 23, 1973. Officer Earnest Baty, Jr., of the Narcotics Division of the Iowa City Police Department was admitted into a residence at 326 North Dubuque Street in Iowa City by defendant. Baty asked defendant whether he could purchase one "lid" of marijuana. Defendant agreed to make the sale and stated the price was twenty dollars.
Defendant then left the room, returning thereafter with a plastic bag containing the purported marijuana, which she gave to Officer Baty in return for a twenty dollar bill. Baty also inquired concerning the purchase of a pound of marijuana to which defendant replied that the officer should check with her the next day.
Possession of the bag of marijuana passed through several police officers until it reached Wayne B. Eaton, a chemist at the Iowa Criminalistics Laboratory, who determined the substance was in fact marijuana.
During the hearing defendant took the stand and gave the court a short life history. Perhaps important to the court's decision were the facts defendant, separated from her husband, had custody of her four-year-old son, was then gainfully employed full time at the Emma Goldman Clinic for Women in Iowa City, and had been convicted (out of state) only once for the misdemeanor of shopliftingshe had never been charged with any drug related offenses.
I. One of the issues raised by defendant's appeal relates to the trial court's acceptance of defendant's tendered plea of guilty.
Defendant contends the record is insufficient to support the trial court's determination that a factual basis existed for defendant's guilty plea.
The reporter's transcript of the proceedings had at the guilty plea and sentencing stage has been certified to this court. It consists of 19 typewritten pages.
The trial court after determining that defendant's guilty plea was a voluntary and intelligent act done with actual knowledge of the existence and meaning of her constitutional rights involved and with full *831 understanding of the charge made against her and the direct consequences of the plea then proceeded to determine whether there was a factual basis for accepting defendant's tendered plea. State v. Clayton, 217 N.W.2d 685, 686 (Iowa 1974).
Since defendant's challenge does not involve the first three responsibilities of the trial judge when a guilty plea is tendered consideration will therefore be limited to the sufficiency of the record to support a factual basis for defendant's guilty plea.
When a guilty plea is tendered the trial judge must make an inquiry on the record, by appropriate method, to satisfy himself there is a factual basis for the plea. Ryan v. Iowa State Penitentiary, Ft. Madison, 218 N.W.2d 616, 618-620 (Iowa 1974); Brainard v. State, 222 N.W.2d 711 (Iowa 1974); and State v. Williams, 224 N.W.2d 17, 18 (Iowa 1974).
Williams, 224 N.W.2d at 18-19, has this statement:
"In Ryan we recognized three methods for determining that a factual basis exists for a guilty plea: (1) inquiry of the defendant, (2) inquiry of the prosecutor, and (3) examination of the presentence report. In Hansen and Marsan [State v. Marsan, 221 N.W.2d 278 (Iowa 1974)] we recognized that the judge may also refer to the minutes of testimony attached to the indictment or county attorney's information. It is essential, whatever source is used, that the factual basis be identified and disclosed in the record. The preferable method would be for the judge to ask the defendant, `What did you do?'. See State v. Hansen, 221 N.W.2d [274] 276 (Iowa 1974)."
The transcript discloses that after the trial judge addressed defendant personally regarding the offense charged and her tendered plea of guilty and explained to her in detail the Code section under which she was charged he then inquired of defendant about the plea bargaining.
The trial judge next turned to the information under which defendant was charged. Minutes of testimony were attached to the county attorney's information filed in this matter. These minutes indicated Officer Baty would testify defendant admitted him to a residence in Iowa City on August 23, 1973. Following defendant's affirmative reply to his inquiry whether he could purchase a "lid" they had a conversation about the price in which defendant told Baty the price was "20." According to the minutes Baty was prepared to describe how defendant left the room where the two had the conversation and returned with a plastic bag containing material later found to be marijuana which she delivered to him in exchange for a twenty dollar bill. This witness would testify he made inquiry of defendant about the possibility of purchasing a pound of marijuana and she told him to "check with her the following day."
The trial judge asked defendant whether the minutes of Baty's testimony attached to the information correctly reflected what happened at her residence on August 23, 1973. She replied they did and that the facts were essentially true.
The factual basis for the plea was thus adequately identified and disclosed in the record. See State v. Williams, 224 N.W.2d at 18-19.
Defendant's contention the record is insufficient to support the trial court's determination that a factual basis existed for defendant's guilty plea is without merit.
II. Defendant next contends section 245.4, The Code, 1973, (since repealed by the First Regular Session of the Sixty-fifth General Assembly, chapter 1093, section 92) is unconstitutional as violative of the equal protection clause. The statute at time of trial read as follows:
"245.4 Commitments generally. All females over eighteen years of age, and married females under eighteen years of age, who are convicted in the district court of *832 offenses punishable by imprisonment in excess of thirty days, shall, if imprisonment be imposed, be committed to the women's reformatory."
The equal protection contention is that a man convicted of the same crime would be allowed to remain at the county jail, whereas defendant, a twenty-seven year old mother, will be transferred to the women's reformatory several hundred miles away. Defendant's crime is an indictable misdemeanor but she will be required to serve out her term with convicted felons. This, defendant claims, is in violation of Amendment 14 of the federal constitution.
Defendant attacks the sentence imposed following her conviction only insofar as it directs that she be incarcerated in the women's reformatory at Rockwell City. As indicated, the judgment imposed provided, "* * * defendant be sentenced to imprisonment in the Johnson County Jail for a term of six months, and in accordance with the provision of section 245.4 of the Iowa Code, defendant is committed to the Iowa State Reformatory for Women at Rockwell City, Iowa, and the Sheriff of Johnson County, Iowa, is directed to transfer the defendant to that institution."
The first question is whether the assignment stemming from defendant's contentions urged in this division was properly preserved for review in this court.
Ordinarily, issues not raised in the trial court including constitutional questions cannot be effectively asserted for the first time on appeal. Furthermore, the constitutionality of a statute may not be considered on appeal when ruling by the trial court on the constitutionality was not invoked. State v. Ritchison, 223 N.W.2d 207, 213 (Iowa 1974) and authorities cited.
In Ritchison the State maintained a constitutional challenge to a statute is waived if not raised by a demurrer. This court rejected the contention demurrer was the exclusive method of challenging the constitutionality of a statute in all cases and held when a party challenges the constitutionality of a statute he must do so at the earliest available opportunity in the progress of the case in order to preserve for review any alleged error in the trial court's ruling. Ritchison's attack was made for the first time in a motion for directed verdict at the close of all evidence. The court held this was not timely. See State v. Boer, 224 N.W.2d 217, 218 (Iowa 1974).
The record discloses that when the trial judge was addressing defendant personally at the plea and sentencing stage as to the maximum penalty which could be imposed in the event the court accepted her guilty plea, he specifically called her attention to the fact the statute applicable in her case provided any sentence confining her to a county jail for a term of more than 30 days would have to be served in and she would have to be committed to the women's reformatory at Rockwell City. When the judge asked defendant if she understood the penalty, she answered she did.
After defense counsel had made a statement prior to imposition of sentence the court advised defendant it would impose a sentence of six months imprisonment in the Johnson county jail and under the provisions of section 245.4, The Code, she would be committed to the women's reformatory at Rockwell City. As pointed out, the formal sentence so provided.
It must be conceded defendant did not at any stage of the proceedings in the trial court raise the issue of the constitutionality of section 245.4. However, defendant insists a motion in arrest of judgment would not be necessary or appropriate since she does not argue the invalidity of the judgment.
The information in this matter was filed November 12, 1973. Sentence was imposed April 9, 1974. Before the trial court accepted defendant's guilty plea she was advised by the court that under the provisions of *833 section 245.4 any sentence in excess of 30 days which might be imposed would require her incarceration at the women's reformatory. This statute, before being repealed, had been a part of the statutory law of this state for more than 50 years. Nevertheless, the issue of the constitutionality of the statute was not raised until defendant's brief was filed in this court August 21. It cannot logically be maintained this was the earliest available opportunity in the progress of the case to question the constitutionality of the statute.
This assignment presents nothing for review.
The case is thereforeaffirmed.
