Class: Jquery::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Extended by:
TemplatePath
Defined in:
lib/generators/jquery/install/install_generator.rb

Instance Method Summary collapse

Methods included from TemplatePath

source_root

Instance Method Details

#download_jquery_filesObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/generators/jquery/install/install_generator.rb', line 8

def download_jquery_files
  %w(controls.js dragdrop.js effects.js prototype.js rails.js).each do |js|
    remove_file "public/javascripts/#{js}"
  end

  # Downloading latest jQuery.min
  get "http://code.jquery.com/jquery-latest.min.js", "public/javascripts/jquery.js"

  # Downloading latest jQuery drivers
  get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js"
end

#show_readmeObject



20
21
22
# File 'lib/generators/jquery/install/install_generator.rb', line 20

def show_readme
  readme "README"
end