Join GoRails to continue learning
Subscribe to GoRails to get access to this episode and all other pro episodes, and access to our private Slack community of Ruby and Rails devs.
Episode 116 · May 2, 2016
Learn how to setup forms to work with Turbolinks iOS and Android adapters
Add this to your application as turbolinks-forms.js.coffee
and make sure it gets required in application.js
$.rails.ajax = (options) -> op = $.ajax(options) op.done (response) -> unless response.substring(0, 10) == 'Turbolinks' Turbolinks.clearCache() document.documentElement.innerHTML = response Turbolinks.dispatch("turbolinks:load") window.scroll(0,0)
Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.