Class: ClientSideValidations::Generators::InstallGenerator

Inherits:
CopyAssetsGenerator
  • Object
show all
Defined in:
lib/generators/client_side_validations/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CopyAssetsGenerator

asset_directory, asset_file_names, assets, copy_assets?, #copy_javascript_asset, sprockets?, webpacker?

Class Method Details

.installation_messageObject



13
14
15
# File 'lib/generators/client_side_validations/install_generator.rb', line 13

def self.installation_message
  "Copies initializer into config/initializers and #{super.downcase}"
end

Instance Method Details

#copy_initializerObject



8
9
10
11
# File 'lib/generators/client_side_validations/install_generator.rb', line 8

def copy_initializer
  source_paths << File.expand_path('../templates/client_side_validations', __dir__)
  copy_file 'initializer.rb', 'config/initializers/client_side_validations.rb'
end