Class: NestedForm::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- NestedForm::Generators::InstallGenerator
- Defined in:
- lib/generators/nested_form/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
4 5 6 |
# File 'lib/generators/nested_form/install_generator.rb', line 4 def self.source_root File.('../../../../vendor/assets/javascripts', __FILE__) end |
Instance Method Details
#copy_jquery_file ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/generators/nested_form/install_generator.rb', line 8 def copy_jquery_file if File.exists?('public/javascripts/prototype.js') copy_file 'prototype_nested_form.js', 'public/javascripts/nested_form.js' else copy_file 'jquery_nested_form.js', 'public/javascripts/nested_form.js' end end |