Class: Umlaut::RemoveTurbolinks

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/umlaut/remove_turbolinks_generator.rb

Instance Method Summary collapse

Instance Method Details


10
11
12
# File 'lib/generators/umlaut/remove_turbolinks_generator.rb', line 10

def remove_turbolinks_gem
  gsub_file "Gemfile", /( *\# Turbolinks.*\n)? *gem ['"]turbolinks['"].*\n/, '', :verbose => true
end

6
7
8
# File 'lib/generators/umlaut/remove_turbolinks_generator.rb', line 6

def remove_turbolinks_js_reference
  gsub_file "app/assets/javascripts/application.js", /\/\/\= require ['"]?turbolinks['"]?\n?/, ''
end