Class: ValidationAuditor::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ValidationAuditor::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/validation_auditor/install_generator.rb
Overview
Generator to be able to run ‘rails generate validation_auditor:install`
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Instance Method Summary collapse
-
#create_migration_file ⇒ Object
Create migration files.
Class Method Details
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
21 22 23 |
# File 'lib/generators/validation_auditor/install_generator.rb', line 21 def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#create_migration_file ⇒ Object
Create migration files.
16 17 18 |
# File 'lib/generators/validation_auditor/install_generator.rb', line 16 def create_migration_file migration_template "migration.rb", "db/migrate/create_validation_audits.rb" end |