Class: Ahoy::Generators::MongoidGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_templatesObject



8
9
10
11
12
13
# File 'lib/generators/ahoy/mongoid_generator.rb', line 8

def copy_templates
  template "database_store_initializer.rb", "config/initializers/ahoy.rb"
  template "mongoid_visit_model.rb", "app/models/ahoy/visit.rb"
  template "mongoid_event_model.rb", "app/models/ahoy/event.rb"
  puts "\nAlmost set! Last, run:\n\n    rake db:mongoid:create_indexes"
end