sinatra app with javascript and ajax