Class: BadBrowser::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/bad_browser/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#inject_bad_browser_jsObject



7
8
9
10
11
12
13
# File 'lib/generators/bad_browser/install/install_generator.rb', line 7

def inject_bad_browser_js
  if File.exist?("app/assets/javascripts/application.js")
    inject_into_file "app/assets/javascripts/application.js", :after => "//= require jquery_ujs\n" do
      "//= require bad_browser\n"
    end
  end
end