stackoverflow.com/questions/15377367/using-sinatra-and-jquery-without-redirecting-on-post
stackoverflow.com/questions/14933685/sinatra-javascript-call
stackoverflow.com/questions/4857374/ruby-w-sinatra-what-is-the-equivalent-of-a-js-erb-from-rails
stackoverflow.com/questions/4856002/ruby-w-sinatra-could-i-have-an-example-of-a-jquery-ajax-request
其实只要一个rails.js
https://github.com/rails/jquery-ujs
ref:
1.http://code.jquery.com/jquery-1.11.1.min.js
2.https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L34