Sha256: 2e9754d0c70f880f5e81c0afe2cb8f84a66401bf6371ae7cc977c1cc1c6a4a09

Contents?: true

Size: 517 Bytes

Versions: 37

Compression:

Stored size: 517 Bytes

Contents

module Cocoon
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      desc "This generator installs the javascript needed for cocoon"
      def copy_the_javascript
        if ::Rails.version[0..2].to_f >= 3.1
          puts "Installing is no longer required since Rails 3.1"
        else
          copy_file "../../../../../app/assets/javascripts/cocoon.js", "public/javascripts/cocoon.js"
        end
      end

    end
  end
end

Version data entries

37 entries across 37 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/lib/generators/cocoon/install/install_generator.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/lib/generators/cocoon/install/install_generator.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/cocoon-1.2.15/lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.15 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.14 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.13 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.12 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.11 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.10 lib/generators/cocoon/install/install_generator.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/cocoon-1.2.9/lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.9 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.8 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.7 lib/generators/cocoon/install/install_generator.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/cocoon-1.2.6/lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.6 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.5 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.4 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.3 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.2 lib/generators/cocoon/install/install_generator.rb
cocoon-1.2.1 lib/generators/cocoon/install/install_generator.rb