Skip to content

Commit

Permalink
Use driver_ujs now that we no longer have to depend on a shared name …
Browse files Browse the repository at this point in the history
…and insert all prototype dependencies if thats specified
  • Loading branch information
dhh committed Apr 13, 2011
1 parent 26528ef commit 17c1b0f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/rails/app/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def vendor_javascripts
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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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 .

0 comments on commit 17c1b0f

Please sign in to comment.