Sha256: c31547fbe6c613c1b732ec5163c7d06c05830fde5fc745f573bc54a6ca96fea5

Contents?: true

Size: 580 Bytes

Versions: 13

Compression:

Stored size: 580 Bytes

Contents

require 'generators/delayed_job/delayed_job_generator'
require 'rails/generators/migration'
require 'rails/generators/active_record/migration'

# Extend the DelayedJobGenerator so that it creates an AR migration
module DelayedJob
  class UpgradeGenerator < ::DelayedJobGenerator
    include Rails::Generators::Migration
    extend ActiveRecord::Generators::Migration

    self.source_paths << File.join(File.dirname(__FILE__), 'templates')

    def create_migration_file
      migration_template 'upgrade_migration.rb', 'db/migrate/add_queue_to_delayed_jobs.rb'
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
raj_delayed_job_active_record-0.0.4 lib/generators/delayed_job/upgrade_generator.rb
raj_delayed_job_active_record-0.0.3 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.4.4 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-4.0.0.beta1 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.4.3 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.4.2 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.4.1 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.4.0 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.3.3 lib/generators/delayed_job/upgrade_generator.rb
drewda_delayed_job_active_record-0.3.2 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.3.2 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.3.1 lib/generators/delayed_job/upgrade_generator.rb
delayed_job_active_record-0.3.0 lib/generators/delayed_job/upgrade_generator.rb