Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix generation of prototype files, it should work with --javascript p…

…rototype, not --prototype
  • Loading branch information...
commit 7f77d6691f567b33e23b515ad495071bef8f775e 1 parent 978314c
@drogus drogus authored vijaydev committed
View
2  railties/lib/rails/generators/rails/app/app_generator.rb
@@ -109,7 +109,7 @@ def javascripts
copy_file "public/javascripts/#{@options[:javascript]}.js"
copy_file "public/javascripts/#{@options[:javascript]}_ujs.js", "public/javascripts/rails.js"
- if options[:prototype]
+ if options[:javascript] == "prototype"
copy_file "public/javascripts/controls.js"
copy_file "public/javascripts/dragdrop.js"
copy_file "public/javascripts/effects.js"
View
2  railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
@@ -101,7 +101,7 @@ def javascripts
copy_file "#{app_templates_dir}/public/javascripts/#{options[:javascript]}.js", "public/javascripts/#{options[:javascript]}.js"
copy_file "#{app_templates_dir}/public/javascripts/#{options[:javascript]}_ujs.js", "public/javascripts/rails.js"
- if options[:prototype]
+ if options[:javascript] == "prototype"
copy_file "#{app_templates_dir}/public/javascripts/controls.js", "public/javascripts/controls.js"
copy_file "#{app_templates_dir}/public/javascripts/dragdrop.js", "public/javascripts/dragdrop.js"
copy_file "#{app_templates_dir}/public/javascripts/effects.js", "public/javascripts/effects.js"
View
3  railties/test/generators/app_generator_test.rb
@@ -135,6 +135,9 @@ def test_prototype_and_test_unit_are_added_by_default
assert_file "public/javascripts/application.js"
assert_file "public/javascripts/prototype.js"
assert_file "public/javascripts/rails.js"
+ assert_file "public/javascripts/controls.js"
+ assert_file "public/javascripts/dragdrop.js"
+ assert_file "public/javascripts/dragdrop.js"
assert_file "test"
end
Please sign in to comment.
Something went wrong with that request. Please try again.