Sha256: c2b76a49d53ad45b489cfed594f64c7cc5d24921cbc662547a6324431c6610f6

Contents?: true

Size: 502 Bytes

Versions: 2

Compression:

Stored size: 502 Bytes

Contents

require 'rails'

module Rateit
  module Generators
    class InstallGenerator < ::Rails::Generators::Base

      desc "This generator installs the jQuery RateIt plugin"

      def inject_javascript
        inject_into_file "app/assets/javascripts/application.js", "//= require jquery.rateit\n", :after => "//= require jquery\n"
      end

      def inject_stylesheet
        inject_into_file "app/assets/stylesheets/application.css", "*= require rateit\n", :after => "/*\n"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails-rateit-0.2 lib/generators/rateit/install/install_generator.rb
rails-rateit-0.1 lib/generators/rateit/install/install_generator.rb