Class: Auditrail::Generators::MigrationsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Auditrail::Generators::MigrationsGenerator
- Defined in:
- lib/generators/migrations.rb
Instance Method Summary collapse
Instance Method Details
#prepare ⇒ Object
9 10 11 12 13 |
# File 'lib/generators/migrations.rb', line 9 def prepare migrations_dir = File.join("db", "migrate") file_name = ::ActiveRecord::Generators::Base.next_migration_number(migrations_dir) copy_file("audits_table.rb", File.join(migrations_dir, "#{file_name.to_s}_create_audits.rb")) end |