class HomeController < ApplicationController
def first
if request.get?
aform 'first', [input('foo'), submit]
else
session[:foo] = params[:foo]
wlink 'third', 'click here'
end
end
def third
pr "you said: #{session[:foo]}"
end
end class HomeController < ApplicationController
def first
if request.get?
aform 'first', [input('foo'), submit]
else
if params[:foo] && params[:foo] =~ /[A-Za-z0-9]/
session[:foo] = params[:foo]
wlink 'third', 'click here'
else
aform 'first', ["Please enter an alphanumeric string", input('foo'), submit]
end
end
end
def third
pr "you said: #{session[:foo]}"
end
end
Of course, we'll then want to allow the designers to modify the presentation, and allow the copy writers to add compelling text, etc. So, it seems like a template system is the way to go, but maybe someone has a better idea.-----
Also, I wonder about the overhead of continuation based approaches with higher volumes.
-----