Class: GoodJob::InstallGenerator

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

Overview

Implements the Rails generator used for setting up GoodJob in a Rails application. Run it with bin/rails g good_job:install in your console.

This generator is primarily dedicated to stubbing out a migration that adds a table to hold GoodJob’s queued jobs in your database.

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject

Generates the actual migration file and places it on disk.



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

def create_migration_file
  migration_template 'migration.rb.erb', 'db/migrate/create_good_jobs.rb', migration_version: migration_version
end