Class: Pecorino::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pecorino::InstallGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/pecorino/install_generator.rb
Overview
Rails generator used for setting up Pecorino in a Rails application. Run it with bin/rails g pecorino:install in your console.
Constant Summary collapse
- TEMPLATES =
File.join(File.dirname(__FILE__))
Instance Method Summary collapse
-
#create_migration_file ⇒ Object
Generates monolithic migration file that contains all database changes.
Instance Method Details
#create_migration_file ⇒ Object
Generates monolithic migration file that contains all database changes.
20 21 22 |
# File 'lib/pecorino/install_generator.rb', line 20 def create_migration_file migration_template "migrations/create_pecorino_tables.rb.erb", File.join(db_migrate_path, "create_pecorino_tables.rb") end |