class Jquery::Generators::InstallGenerator
def download_jquery
def download_jquery # Downloading latest jQuery if @@versions.include?(options.version) puts "Fetching JQuery version #{options.version}!" get "http://ajax.googleapis.com/ajax/libs/jquery/#{options.version}/jquery.min.js", "public/javascripts/jquery.min.js" get "http://ajax.googleapis.com/ajax/libs/jquery/#{options.version}/jquery.js", "public/javascripts/jquery.js" else puts "JQuery #{options.version} is invalid; fetching #{@@versions[1]} instead." get "http://ajax.googleapis.com/ajax/libs/jquery/#{@@versions[1]}/jquery.min.js", "public/javascripts/jquery.min.js" get "http://ajax.googleapis.com/ajax/libs/jquery/#{@@versions[1]}/jquery.js", "public/javascripts/jquery.js" end # Downloading latest jQueryUI minified get "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js", "public/javascripts/jquery-ui.min.js" if options.ui? get "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.js", "public/javascripts/jquery-ui.js" if options.ui? end
def download_ujs_driver
def download_ujs_driver # Downloading latest jQuery drivers get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js" end
def remove_prototype
def remove_prototype %w(controls.js dragdrop.js effects.js prototype.js).each do |js| remove_file "public/javascripts/#{js}" end end