diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-16 22:53:37 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-17 01:59:51 +0800 |
commit | 114fa4d43121cd05fc18a8449a4d1abd92978a72 (patch) | |
tree | b282b8711eaaf71c0778ca9a47a3e0f74bc281c2 /railties/lib | |
parent | ea7f1fb026a384a2b39362aa179ebfa0ba14a816 (diff) | |
download | rails-114fa4d43121cd05fc18a8449a4d1abd92978a72.tar.gz rails-114fa4d43121cd05fc18a8449a4d1abd92978a72.tar.bz2 rails-114fa4d43121cd05fc18a8449a4d1abd92978a72.zip |
Adds application.js when app is generated with -J and clear javascript_expansions[:defaults]
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/application.rb | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 7d50e7da67..c99aa3c0cd 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -115,6 +115,7 @@ module Rails directory "public/javascripts" else empty_directory_with_gitkeep "public/javascripts" + create_file "public/javascripts/application.js" end end 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 589f7e674a..ad8f523c28 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/application.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/application.rb @@ -40,7 +40,11 @@ module <%= app_const_base %> # config.i18n.default_locale = :de # Add your default javascripts +<% if options[:skip_prototype] -%> + config.action_view.javascript_expansions[:defaults] = [] +<% else -%> # config.action_view.javascript_expansions[:defaults] = %w(jquery rails) +<% end -%> # Configure generators values. Many other options are available, be sure to check the documentation. # config.generators do |g| |