class WhatbeforeController < RecognizeController def start_choices n=get_nitems choices=[] while choices.size < n choices << (rand(12)+2).to_s choices.uniq! end session[:answer]=choices[rand(n)] lognewproblem(get_question,get_answer) choices.sort end def get_question translate ("what comes before") +" "+ (get_answer.to_i+1).to_s+"?" end end