Class: AeActiveJobStateGenerator

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

Constant Summary collapse

MIGRATIONS =
[
  %w[0.1.0 create_ae_active_job_state_tables.rb],
  %w[0.3.0 add_worker_class_column_to_job_state_table.rb]
].freeze

Instance Method Summary collapse

Instance Method Details

#copy_migrationsObject



16
17
18
19
20
21
# File 'lib/generators/ae_active_job_state_generator.rb', line 16

def copy_migrations
  since_version = Gem::Version.new(options['since_version'])
  MIGRATIONS.each do |version, file|
    migration_template file, "db/migrate/#{file}" if Gem::Version.new(version) > since_version
  end
end