Class: AuditWeasel::Generators::AuditWeaselGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- AuditWeasel::Generators::AuditWeaselGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/audit_weasel/audit_weasel_generator.rb
Overview
Creates a migration script to add the auditing columns to the given table
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
16 17 18 |
# File 'lib/generators/audit_weasel/audit_weasel_generator.rb', line 16 def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end |
Instance Method Details
#create_audit_weasel_migration ⇒ Object
20 21 22 |
# File 'lib/generators/audit_weasel/audit_weasel_generator.rb', line 20 def create_audit_weasel_migration migration_template 'migration.rb', "db/migrate/audit_weasel_#{plural_name}.rb" end |