Class: LeveretAuth::MigrationGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



20
21
22
# File 'lib/generators/leveret_auth/migration_generator.rb', line 20

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

Instance Method Details

#installObject



12
13
14
15
16
17
18
# File 'lib/generators/leveret_auth/migration_generator.rb', line 12

def install
  migration_template(
    'migration.rb.erb',
    'db/migrate/create_leveret_auth_tables.rb',
    migration_version: migration_version
  )
end