diff options
author | Xavier Noria <fxn@hashref.com> | 2011-03-24 23:43:37 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-04-13 13:23:16 +0200 |
commit | 096fa1b60f537c7c30db35f5576ab351c67a5064 (patch) | |
tree | 7a66e8bfe57359f6a6a20ffa0cd10602b3e4637d /railties/lib/rails/generators | |
parent | 805126b20a39c6f05c46bff780245b0e1c6bc046 (diff) | |
download | rails-096fa1b60f537c7c30db35f5576ab351c67a5064.tar.gz rails-096fa1b60f537c7c30db35f5576ab351c67a5064.tar.bz2 rails-096fa1b60f537c7c30db35f5576ab351c67a5064.zip |
jQuery is the new default
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/app_base.rb | 8 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 93db5106ce..5a8906f035 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -10,7 +10,7 @@ module Rails module Generators class AppBase < Base DATABASES = %w( mysql oracle postgresql sqlite3 frontbase ibm_db ) - JAVASCRIPTS = %w( prototype jquery ) + JAVASCRIPTS = %w( jquery prototype ) attr_accessor :rails_template add_shebang_option! @@ -36,11 +36,11 @@ module Rails class_option :database, :type => :string, :aliases => "-d", :default => "sqlite3", :desc => "Preconfigure for selected database (options: #{DATABASES.join('/')})" - class_option :javascript, :type => :string, :aliases => "-j", :default => "prototype", - :desc => "Preconfigure for selected javascript library (options: #{JAVASCRIPTS.join('/')})" + class_option :javascript, :type => :string, :aliases => "-j", :default => "jquery", + :desc => "Preconfigure for selected JavaScript library (options: #{JAVASCRIPTS.join('/')})" class_option :skip_javascript, :type => :boolean, :aliases => "-J", :default => false, - :desc => "Skip javascript files" + :desc => "Skip JavaScript files" class_option :dev, :type => :boolean, :default => false, :desc => "Setup the #{name} with Gemfile pointing to your Rails checkout" diff --git a/railties/lib/rails/generators/rails/app/templates/config/application.rb b/railties/lib/rails/generators/rails/app/templates/config/application.rb index b7f64af339..68b2457af5 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -42,10 +42,10 @@ module <%= app_const_base %> # JavaScript files you want as :defaults (application.js is always included). <% if options[:skip_javascript] -%> config.action_view.javascript_expansions[:defaults] = %w() -<% elsif options[:javascript] == 'jquery' -%> - config.action_view.javascript_expansions[:defaults] = %w(jquery rails) +<% elsif options[:javascript] == 'prototype' -%> + config.action_view.javascript_expansions[:defaults] = %w(prototype effects dragdrop controls rails) <% else -%> - # config.action_view.javascript_expansions[:defaults] = %w(jquery rails) + # config.action_view.javascript_expansions[:defaults] = %w(prototype effects dragdrop controls rails) <% end -%> <% if options[:skip_test_unit] -%> |