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

create methods in controllers cause root to load multiple times. #50

Open
serodriguez68 opened this issue Mar 3, 2015 · 1 comment
Open

Comments

@serodriguez68
Copy link

Hi Daniel!

I've followed the book closely and the app is working great (https://sr-learn-rails.herokuapp.com/).

When I installed the analytics feature through segment.io (Ch. 26) I noticed a strange behavior on my segment debugger dashboard:
Whenever a form event is triggered (sign up or contact request) the user is redirected to the root (as intended) but the page is loaded 3 times. The same behavior happens when you load the app using the URL (not the nav links).

I attached a screenshot of my segment dashboard to give you some context.

Any idea why this is happening?

Note: The console.log line you wrote in the segmentio.js file is also printed 2 times when an event is triggered.

image

@nithinbekal
Copy link

I was able to reproduce this with @serodriguez68's repo serodriguez68/learn-rails and it looks like a Turbolinks issue.

Maybe we should close this, @DanielKehoe? This issue has been around for so long, and Turbolinks has been rewritten from scratch since then. ;) This issue does not happen in the latest version of this repo.

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

No branches or pull requests

2 participants