问题
Sorry if this has been covered. Looking for a example of AJAX with Sinatra, specifically to get a partial and apply it to a tag in the DOM, from a javascript button handler. thx
回答1:
Check out these examples:
- https://github.com/fcantelmi/sinatra_ajax/ (tiny example)
- https://github.com/crguezl/sinatra-jquery-ajax/
- http://ididitmyway.heroku.com/past/2011/2/27/ajax_in_sinatra/
来源:https://stackoverflow.com/questions/9120972/looking-for-sinatra-ajax-example