Class: Platforms::Core::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Platforms::Core::InstallGenerator
- Defined in:
- lib/generators/platforms/core/install/install_generator.rb
Overview
Simplify the installation of Platforms::Core by creating an initializer file and installing the migrations. This does not run the migrations.
Instance Method Summary collapse
-
#copy_initializer_file ⇒ Object
Create config/initializers/platforms_core.rb according to the template.
-
#install_migrations ⇒ Object
Install the gem’s migrations.
Instance Method Details
#copy_initializer_file ⇒ Object
Create config/initializers/platforms_core.rb according to the template.
13 14 15 |
# File 'lib/generators/platforms/core/install/install_generator.rb', line 13 def copy_initializer_file copy_file "platforms_core.rb", "config/initializers/platforms_core.rb" end |
#install_migrations ⇒ Object
Install the gem’s migrations. This is equivalent to the built-in rake task “platforms_core:install:migrations”
20 21 22 |
# File 'lib/generators/platforms/core/install/install_generator.rb', line 20 def install_migrations rake "platforms_core:install:migrations" end |