-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 an option to skip installation of Turbolinks #15716
Conversation
Do we need a test that turbolinks is included by default? |
This was submitted several times and we rejected. You can easily remove
|
Agree with @rafaelfranca, there's not much to skip here. Just remove the entry and @schuetzm thank you for your work. |
@senny That's not enough. You also need to remove the line in the JS manifest. And there are the |
@schuetzm I can reopen but as @rafaelfranca said, it was submitted before and was rejected for the reasons presented. Let's hear some more opinions. |
Actually I am also in support for this 👍. We have options for skipping Spring, Sprockets, ActiveRecord, Javascript etc. because they are the defined defaults for the Rails app. Since Turbolinks is now included by default, I think we should have an option for disable that too.. |
If all we must do is remove the GemfileEntry, it seems there's an opportunity to add a single option for every entry in the gemfile: I'm gently in favour of some way to do this: turbolinks is the one part of the default stack I'll generally remove... though I'd normally wait until it seems to be interfering. |
So, we already have a way to remove entirely turbolinks using generators
|
@matthewd I didn't write this because I thought I might be the only one, but I also always end up removing it. I tried to work with it several times, but it always gets in the way sooner or later. @rafaelfranca Is this easy to use? Because I suspect if people first have to put together a generator template, it will be worse than the current situation... |
I support the idea of an option to remove turbolinks, I always remove it from my apps. I just pull requested (#15766) an update to the generated application layout to move the JavaScript from the head to the bottom of the body. Whilst that doesn't make sense in light of including turbolinks, I'd like an easy to way to exclude turbolinks and have the layout generated with the JavaScript at the bottom of the body and this seems to be a good start towards that. |
@schuetzm it is very easy, just create a new ruby file, and put this content: add_gem_entry_filter { |gem|
gem.name != 'turbolinks'
} You can even place it on |
As I feared, that's more complicated than removing it manually. I doubt most users will know how to do that without looking it up, and then we're again where we are now. |
Like I said it is not documented but I don't think it is much more complicated than |
I'll merge this but I'm going to implement a better API to avoid adding new options to every entry in our Gemfile. Thanks |
Add an option to skip installation of Turbolinks
Implemented at 1056589 Thanks for the test case |
There are already options for disabling Spring, Sprockets, ActiveRecord, Javascript in general, and several other components. This PR adds one for skipping Turbolinks.