Class: ActiveRecordAnonymizer::AnonymizeGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/active_record_anonymizer/anonymize_generator.rb

Defined Under Namespace

Classes: InvalidArguments

Instance Method Summary collapse

Instance Method Details

#generate_migrationObject



16
17
18
19
20
# File 'lib/generators/active_record_anonymizer/anonymize_generator.rb', line 16

def generate_migration
  validate_arguments
  migration_template "migration.rb.erb", "db/migrate/anonymize_#{table_name}.rb"
  output_instructions
end