Class: FeatherAi::Generators::AddCorrectionsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- FeatherAi::Generators::AddCorrectionsGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/feather_ai/add_corrections_generator.rb
Overview
Rails generator for adding user correction fields.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
19 20 21 22 |
# File 'lib/generators/feather_ai/add_corrections_generator.rb', line 19 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 ⇒ Object
24 25 26 27 28 29 |
# File 'lib/generators/feather_ai/add_corrections_generator.rb', line 24 def create_migration migration_template( "correction_migration.rb.tt", "db/migrate/add_feather_ai_correction_fields_to_#{model_name.underscore.pluralize}.rb" ) end |