lib/generators/jquery/install/install_generator.rb in jquery_rails3-1.4.3 vs lib/generators/jquery/install/install_generator.rb in jquery_rails3-1.6
- old
+ new
@@ -1,12 +1,12 @@
module Jquery
class InstallGenerator < Rails::Generators::Base
PATH = source_root File.expand_path('../templates', __FILE__)
# Options
class_option :ui, :type => :boolean, :defalut => false, :desc => "Add jquery-ui components to application."
- class_option :ui_version, :type => :string, :defalut => "1.8.5", :desc => "Version of jquery-ui components to application."
- class_option :version, :type => :string, :defalut => "1.4.3", :desc => "Version of jquery used in application."
+ class_option :ui_version, :type => :string, :defalut => "1", :desc => "Version of jquery-ui components to application."
+ class_option :version, :type => :string, :defalut => "1", :desc => "Version of jquery used in application."
JS_DEST = "public/javascripts"
CSS_DEST = "public/stylesheets"
@@ -17,11 +17,11 @@
remove_file path if File.exist? path
end
end
def install_jquery
- version = (options[:version].nil?)? "1.4.3" : options[:version]
- ui_version = (options[:ui_version].nil?)? "1.8.5" : options[:ui_version]
+ version = (options[:version].nil?)? "1" : options[:version]
+ ui_version = (options[:ui_version].nil?)? "1" : options[:ui_version]
url = "http://ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js"
#puts url
get url, "#{JS_DEST}/jquery.js"
get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "#{JS_DEST}/rails.js"
\ No newline at end of file