class MaintenanceTasks::InstallGenerator
Generator used to set up the engine in the host application. It handles mounting the engine and installing migrations.
@api private
Public Instance Methods
install_migrations()
click to toggle source
Copies engine migrations to host application and migrates the database
# File lib/generators/maintenance_tasks/install_generator.rb, line 16 def install_migrations rake("maintenance_tasks:install:migrations") rake("db:migrate") end
mount_engine()
click to toggle source
Mounts the engine in the host application's config/routes.rb
# File lib/generators/maintenance_tasks/install_generator.rb, line 11 def mount_engine route("mount MaintenanceTasks::Engine => \"/maintenance_tasks\"") end