Class: Docent::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_migrationsObject



13
14
15
# File 'lib/generators/docent/install/install_generator.rb', line 13

def copy_migrations
  rake "docent:install:migrations"
end

#generate_initializerObject



9
10
11
# File 'lib/generators/docent/install/install_generator.rb', line 9

def generate_initializer
  copy_file "initializer.rb", "config/initializers/docent.rb"
end

#mount_engine_in_routes_fileObject



5
6
7
# File 'lib/generators/docent/install/install_generator.rb', line 5

def mount_engine_in_routes_file
  route 'mount Docent::Engine => "/docent"'
end

#wrapupObject



17
18
19
# File 'lib/generators/docent/install/install_generator.rb', line 17

def wrapup
  puts "All done! Now run rake db:migrate to add Docent's tables to your app and edit config/initializers/docent.rb to finish."
end