Class: DraftApprove::Generators::MigrationGenerator Private
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DraftApprove::Generators::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/draft_approve/migration/migration_generator.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
Instance Method Summary collapse
- #create_migration_file ⇒ Object private
Class Method Details
.next_migration_number(path) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 24 |
# File 'lib/generators/draft_approve/migration/migration_generator.rb', line 21 def self.next_migration_number(path) next_migration_number = current_migration_number(path) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#create_migration_file ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 |
# File 'lib/generators/draft_approve/migration/migration_generator.rb', line 13 def create_migration_file migration_template( 'create_draft_approve_tables.rb', 'db/migrate/create_draft_approve_tables.rb', { migration_version: migration_version, json_type: json_type } ) end |