Class: DelayedJob::ActiveRecordGenerator

Inherits:
DelayedJobGenerator
  • Object
show all
Extended by:
NextMigrationVersion
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/delayed_job/active_record_generator.rb

Direct Known Subclasses

UpgradeGenerator

Class Method Summary collapse

Instance Method Summary collapse

Methods included from NextMigrationVersion

next_migration_number

Class Method Details

.next_migration_number(dirname) ⇒ Object



20
21
22
# File 'lib/generators/delayed_job/active_record_generator.rb', line 20

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

Instance Method Details

#create_migration_fileObject



16
17
18
# File 'lib/generators/delayed_job/active_record_generator.rb', line 16

def create_migration_file
  migration_template "migration.rb", "db/migrate/create_delayed_jobs.rb", migration_version: migration_version
end