Class: ActiveRecallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



16
17
18
# File 'lib/generators/active_recall/active_recall_generator.rb', line 16

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

Instance Method Details

#create_migration_filesObject



20
21
22
23
24
25
26
# File 'lib/generators/active_recall/active_recall_generator.rb', line 20

def create_migration_files
  create_migration_file_if_not_exist 'create_active_recall_tables'
  create_migration_file_if_not_exist 'add_active_recall_item_answer_counts'
  if options['migrate_data']
    create_migration_file_if_not_exist 'migrate_okubo_to_active_recall'
  end
end