Sha256: a86238411fcb090e2c7692128757d3ad6a2a96dbf9ce4c6964976d0974be4f61

Contents?: true

Size: 469 Bytes

Versions: 3

Compression:

Stored size: 469 Bytes

Contents

module BadBrowser
  module Generators
    class InstallGenerator < Rails::Generators::Base
      
      desc 'This generator adds bad_browser to the asset pipeline'
      
      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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bad_browser-0.0.3 lib/generators/bad_browser/install/install_generator.rb
bad_browser-0.0.2 lib/generators/bad_browser/install/install_generator.rb
bad_browser-0.0.1 lib/generators/bad_browser/install/install_generator.rb