diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-13 18:08:02 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2011-04-13 18:08:02 +0200 |
commit | 17c1b0f0d3fa89758c6de0a62754e7e3cd74458c (patch) | |
tree | 7ad0abaaa6aff5487b3997ebcc18e30c8244e0b7 | |
parent | 26528efb54ac781ea71901d2b24e07e95d8ed4d4 (diff) | |
download | rails-17c1b0f0d3fa89758c6de0a62754e7e3cd74458c.tar.gz rails-17c1b0f0d3fa89758c6de0a62754e7e3cd74458c.tar.bz2 rails-17c1b0f0d3fa89758c6de0a62754e7e3cd74458c.zip |
Use driver_ujs now that we no longer have to depend on a shared name and insert all prototype dependencies if thats specified
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 552346facb..f2b527ac07 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -124,7 +124,7 @@ module Rails empty_directory_with_gitkeep "vendor/assets/javascripts" else copy_file "vendor/assets/javascripts/#{options[:javascript]}.js" - copy_file "vendor/assets/javascripts/#{options[:javascript]}_ujs.js", "vendor/assets/javascripts/rails.js" + copy_file "vendor/assets/javascripts/#{options[:javascript]}_ujs.js" if options[:javascript] == "prototype" copy_file "vendor/assets/javascripts/controls.js" diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt new file mode 100644 index 0000000000..8b8ba74c01 --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt @@ -0,0 +1,11 @@ +# FIXME: Tell people that this is a manifest file, real code should go into discrete files +# FIXME: Tell people how Sprockets and CoffeeScript works +# +#= require <%= options[:javascript] %> +#= require <%= options[:javascript] %>_ujs +<% if options[:javascript] == "prototype" %> +#= require controls +#= require dragdrop +#= require effects +<% end -%> +#= require_tree . |