Class: Docent::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Docent::InstallGenerator
- Defined in:
- lib/generators/docent/install/install_generator.rb
Instance Method Summary collapse
- #copy_migrations ⇒ Object
- #generate_initializer ⇒ Object
- #mount_engine_in_routes_file ⇒ Object
- #wrapup ⇒ Object
Instance Method Details
#copy_migrations ⇒ Object
13 14 15 |
# File 'lib/generators/docent/install/install_generator.rb', line 13 def copy_migrations rake "docent:install:migrations" end |
#generate_initializer ⇒ Object
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_file ⇒ Object
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 |
#wrapup ⇒ Object
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 |