Class: RemoveTurbolinks::Generators::RemoveGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RemoveTurbolinks::Generators::RemoveGenerator
- Defined in:
- lib/generators/remove_turbolinks/remove_generator.rb
Instance Method Summary collapse
- #remove_from_application_javascript ⇒ Object
- #remove_from_application_layout ⇒ Object
- #remove_from_gemfile ⇒ Object
Instance Method Details
#remove_from_application_javascript ⇒ Object
13 14 15 |
# File 'lib/generators/remove_turbolinks/remove_generator.rb', line 13 def remove_from_application_javascript gsub_file "app/assets/javascripts/application.js", /\/\/= require turbolinks[\r\n]/, "" end |
#remove_from_application_layout ⇒ Object
9 10 11 |
# File 'lib/generators/remove_turbolinks/remove_generator.rb', line 9 def remove_from_application_layout gsub_file "app/views/layouts/application.html.erb", /, "data-turbolinks-track" => true/, "" end |
#remove_from_gemfile ⇒ Object
4 5 6 7 |
# File 'lib/generators/remove_turbolinks/remove_generator.rb', line 4 def remove_from_gemfile gsub_file "Gemfile", /# Turbolinks makes following links in your web application faster. Read more: https:\/\/github.com\/rails\/turbolinks[\r\n]/, "" gsub_file "Gemfile", /gem 'turbolinks'[\r\n]/, "" end |