Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Turbolinks support #215

wants to merge 1 commit into from

Conversation

kritik
Copy link

@kritik kritik commented Aug 3, 2016

Majority of Rails applications use Turbolinks. So, it's helpful to support them

@DJNgoma
Copy link

DJNgoma commented Sep 6, 2016

Just what I needed. Hope this gets merged into the main repo.

@kritik
Copy link
Author

kritik commented Sep 6, 2016

"The command "bundle exec rake" exited with 1." - So not my code problem

@serradura
Copy link

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:
https://github.com/turbolinks/turbolinks/wiki/Turbolinks-5-FAQ

@koenpunt
Copy link
Contributor

Majority of Rails applications

Not so sure about that..

@Startouf
Copy link

Startouf commented Oct 24, 2016

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.

@kritik
Copy link
Author

kritik commented Oct 24, 2016

@Startouf may be because you load this widget on every page?

thejourneydude added a commit to thejourneydude/intercom-rails that referenced this pull request May 16, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants