Skip to content

Instantly share code, notes, and snippets.

@jonallured
Created May 5, 2013 13:14
Show Gist options
  • Save jonallured/5520802 to your computer and use it in GitHub Desktop.
Save jonallured/5520802 to your computer and use it in GitHub Desktop.
Template code to remove turbolinks from a new Rails 4 app.
# 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