Class: ClientSideValidations::Generators::CopyAssetsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/client_side_validations/copy_assets_generator.rb

Direct Known Subclasses

InstallGenerator

Instance Method Summary collapse

Instance Method Details

#copy_javascript_assetObject



5
6
7
8
9
10
11
12
# File 'lib/generators/client_side_validations/copy_assets_generator.rb', line 5

def copy_javascript_asset
  if self.class == CopyAssetsGenerator || !asset_pipeline_enabled?
    assets.each do |asset|
      source_paths << asset[:path]
      copy_file asset[:file], "#{asset_directory}/#{asset[:file]}"
    end
  end
end