-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Turbolinks support #215
base: master
Are you sure you want to change the base?
Conversation
Just what I needed. Hope this gets merged into the main repo. |
"The command "bundle exec rake" exited with 1." - So not my code problem |
Hello, this PR has compability only with the older Turbolinks version. Because you are listening "page:load" (the old way) instead of "turbolinks:load" (the current version). Check the Should I use Turbolinks 5 or Turbolinks Classic? section: |
Not so sure about that.. |
I am using Turbolinks 5 and I never had problems with the Intercom Widget ?? (Or maybe I had problems all along but I didn't notice :o ) EDIT : nvm, this is just for the first page load, but if you need to push data on every "turbolinked" page then I haven't tested. |
@Startouf may be because you load this widget on every page? |
Intercom is not configured to work with Turbolinks. This commit forces Intercom to reload it's messenger when a new page loads via the following line of code: document.addEventListener('page:load', l, false) This was inspired by the following PR: intercom#215 I am testing this branch via Intercom's instructions: https://github.com/intercom/intercom-rails#running-testsspecs
Majority of Rails applications use Turbolinks. So, it's helpful to support them