Class: GoodJob::InstallGenerator

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

Overview

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

Constant Summary collapse

TEMPLATES =
File.join(File.dirname(__FILE__), "templates/install")

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject

Generates monolithic migration file that contains all database changes.



20
21
22
# File 'lib/generators/good_job/install_generator.rb', line 20

def create_migration_file
  migration_template 'migrations/create_good_jobs.rb.erb', File.join(db_migrate_path, "create_good_jobs.rb")
end