Class: Autocomplete::UncompressedGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/generators/autocomplete/uncompressed_generator.rb', line 10

def self.source_root
  File.join(File.dirname(__FILE__), '..', '..', 'assets', 'javascripts')
end

Instance Method Details

#installObject



5
6
7
8
# File 'lib/generators/autocomplete/uncompressed_generator.rb', line 5

def install
  # Copy the unobtrusive JS file
  copy_file('autocomplete-rails-uncompressed.js', 'public/javascripts/autocomplete-rails.js')
end