Class: AutosuggestGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



11
12
13
# File 'lib/generators/autosuggest_generator.rb', line 11

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

Instance Method Details

#installObject



5
6
7
8
9
# File 'lib/generators/autosuggest_generator.rb', line 5

def install
  # Copy the unobtrusive JS file and CSS file
  copy_file('jquery.autoSuggest.js', 'public/javascripts/jquery.autoSuggest.js')
  copy_file('autoSuggest.css', 'public/stylesheets/autoSuggest.css')
end