Class: ProgressJob::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



15
16
17
# File 'lib/generators/progress_job/install_generator.rb', line 15

def self.next_migration_number(path)
  @migration_number = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i.to_s
end

Instance Method Details

#installObject



11
12
13
# File 'lib/generators/progress_job/install_generator.rb', line 11

def install
  migration_template "migration.rb", "db/migrate/add_progress_to_delayed_jobs.rb"
end