Class: ClientSideValidationsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ClientSideValidationsGenerator
- Defined in:
- lib/generators/client_side_validations_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
5 6 7 |
# File 'lib/generators/client_side_validations_generator.rb', line 5 def self.source_root File.join(File.dirname(__FILE__), '../../javascript/lib') end |
Instance Method Details
#install_client_side_validations ⇒ Object
9 10 11 12 13 14 |
# File 'lib/generators/client_side_validations_generator.rb', line 9 def install_client_side_validations copy_file('../../javascript/lib/client_side_validations.js', 'public/javascripts/client_side_validations.js') copy_file('../../javascript/lib/jquery-validation.js', 'public/javascripts/jquery-validation.js') end |