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

unexpected routes added as part of the turbo rails gem #606

Open
kristoph opened this issue Mar 20, 2024 · 2 comments
Open

unexpected routes added as part of the turbo rails gem #606

kristoph opened this issue Mar 20, 2024 · 2 comments

Comments

@kristoph
Copy link

I am using rails 7.1.2

Anytime I include the turbo rails gem I see these routes which I do not want to have added:

turbo_recede_historical_location GET /recede_historical_location(.:format) turbo/native/navigation#recede
turbo_resume_historical_location GET /resume_historical_location(.:format) turbo/native/navigation#resume
turbo_refresh_historical_location GET /refresh_historical_location(.:format) turbo/native/navigation#refresh

How can I remove these routes? Should these really be added as part of the turbo rails gem?

@kristoph
Copy link
Author

I see that I can ( presumably ) prevent these routes from being added by setting Turbo.draw_routes to false but I am at a loss to understand where that should be set.

@kristoph
Copy link
Author

I was able to solve this by simply creating a turbo.rb initializer and adding Rails.application.config.turbo.draw_routes = false.

But I will leave this issue open because it really seems bad form to have these routes be added by default. The purpose isn't even explained anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant