Passing variables between routes in Sinatra
问题 I'm implementing sms-validation of registration on Sinatra site, and I got this code: post '/reg' do phone = params[:phone].to_s code = Random.rand(1000..9999).to_s HTTParty.get('http://sms.ru/sms/send?api_id=' + api_id + phone + '&text=' + code) end This take users phone from post request, than generates 4 digit code, and sends code on number via get request to sms service. But, page doesn't reloading, because at that moment opens modal dialog, where user should type code . Button which