Class: HasMailbox::Generators::MigrationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/has_mailbox/migration/migration_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



11
12
13
# File 'lib/generators/has_mailbox/migration/migration_generator.rb', line 11

def self.next_migration_number(dirname)
    ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#create_migration_fileObject



15
16
17
18
# File 'lib/generators/has_mailbox/migration/migration_generator.rb', line 15

def create_migration_file
  migration_template 'create_messages_table.rb', 'db/migrate/create_messages_table.rb'
  migration_template 'create_message_copies_table.rb', 'db/migrate/create_message_copies_table.rb'
end