Class: IndexedSearch::IndexerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/indexed_search/indexer/indexer_generator.rb

Overview

Generate an indexer

Instance Method Summary collapse

Instance Method Details

#copy_indexer_fileObject

Copy the template file into place, interpolating it with ERB



10
11
12
# File 'lib/generators/indexed_search/indexer/indexer_generator.rb', line 10

def copy_indexer_file
  template 'indexer.rb.erb', "app/indexers/#{file_name}_indexer.rb"
end