Class: Scriptor::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Scriptor::InstallGenerator
- Defined in:
- lib/generators/scriptor/install_generator.rb
Instance Method Summary collapse
-
#install_migrations ⇒ Object
Copies engine migrations to host application and migrates the database.
-
#mount_engine ⇒ Object
Mounts the engine in the host application’s config/routes.rb.
Instance Method Details
#install_migrations ⇒ Object
Copies engine migrations to host application and migrates the database
11 12 13 14 |
# File 'lib/generators/scriptor/install_generator.rb', line 11 def install_migrations rake("scriptor:install:migrations") rake("db:migrate") end |
#mount_engine ⇒ Object
Mounts the engine in the host application’s config/routes.rb
6 7 8 |
# File 'lib/generators/scriptor/install_generator.rb', line 6 def mount_engine route("mount Scriptor::Engine, at: \"/scriptor\"") end |