Class: Smailer::MigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Smailer::MigrationGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/smailer/migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
14 15 16 |
# File 'lib/generators/smailer/migration_generator.rb', line 14 def self.next_migration_number(path) Time.now.utc.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#generate_migration ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/smailer/migration_generator.rb', line 18 def generate_migration file_name = 'create_smailer_tables' migration_template 'migration.rb.erb', "db/migrate/#{file_name}.rb" end |