Class: MaintenanceTasks::InstallGenerator Private
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- MaintenanceTasks::InstallGenerator
- Defined in:
- lib/generators/maintenance_tasks/install_generator.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Generator used to set up the engine in the host application. It handles mounting the engine and installing migrations.
Instance Method Summary collapse
-
#install_migrations ⇒ Object
private
Copies engine migrations to host application and migrates the database.
-
#mount_engine ⇒ Object
private
Mounts the engine in the host application’s config/routes.rb.
Instance Method Details
#install_migrations ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Copies engine migrations to host application and migrates the database
17 18 19 20 |
# File 'lib/generators/maintenance_tasks/install_generator.rb', line 17 def install_migrations rake("maintenance_tasks:install:migrations") rake("db:migrate") end |
#mount_engine ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Mounts the engine in the host application’s config/routes.rb
12 13 14 |
# File 'lib/generators/maintenance_tasks/install_generator.rb', line 12 def mount_engine route("mount MaintenanceTasks::Engine, at: \"/maintenance_tasks\"") end |