Class: AuthProvider::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AuthProvider::Generators::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/auth_provider/migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/auth_provider/migration_generator.rb', line 15 def self.next_migration_number(dirname) if defined? ActiveRecord::Generators::Base ActiveRecord::Generators::Base.next_migration_number(dirname) elsif defined? ActiveRecord::Migration next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) else fail "Can't find a implementation of next_migration_number" end end |
Instance Method Details
#copy_migration_file ⇒ Object
11 12 13 |
# File 'lib/generators/auth_provider/migration_generator.rb', line 11 def copy_migration_file migration_template "create_auth_provider_tables.rb", "db/migrate/create_auth_provider_tables.rb" end |