Class: DutyFree::InstallGenerator

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

Overview

Auto-generates an IMPORT_TEMPLATE entry for one or more models

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



27
28
29
# File 'lib/generators/duty_free/install_generator.rb', line 27

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

Instance Method Details

#create_migration_fileObject



22
23
24
25
# File 'lib/generators/duty_free/install_generator.rb', line 22

def create_migration_file
  add_duty_free_migration('create_versions')
  add_duty_free_migration('add_object_changes_to_versions') if options.with_changes?
end