Class: Cocoon::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_the_javascriptObject


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

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