Created
May 5, 2013 13:14
-
-
Save jonallured/5520802 to your computer and use it in GitHub Desktop.
Template code to remove turbolinks from a new Rails 4 app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is just a few sed commands to pull out turbolinks if you don't want them. | |
# To use it, just pass this as the template to your rails new command, like this: | |
# $ rails new myapp -m /path/to/no-turbo.rb | |
run "sed '/turbo/d' < Gemfile > Gemfile.tmp && mv Gemfile.tmp Gemfile" | |
run "sed '/turbo/d' < app/assets/javascripts/application.js > app/assets/javascripts/application.tmp && mv app/assets/javascripts/application.tmp app/assets/javascripts/application.js" | |
run "sed 's/, \"data-turbolinks-track\" => true//' < app/views/layouts/application.html.erb > app/views/layouts/application.html.tmp && mv app/views/layouts/application.html.tmp app/views/layouts/application.html.erb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment