Sha256: 5a58631a9f9fbc524760e38821983a9ee2161b68c8c7e87b3afa961e05dac150
Contents?: true
Size: 717 Bytes
Versions: 3
Compression:
Stored size: 717 Bytes
Contents
require "generators/delayed_job/delayed_job_generator" require "generators/delayed_job/next_migration_version" require "rails/generators/migration" require "rails/generators/active_record" # Extend the DelayedJobGenerator so that it creates an AR migration module DelayedJob class ActiveRecordGenerator < ::DelayedJobGenerator include Rails::Generators::Migration extend NextMigrationVersion source_paths << File.join(File.dirname(__FILE__), "templates") def create_migration_file migration_template "migration.rb", "db/migrate/create_delayed_jobs.rb" end def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number dirname end end end
Version data entries
3 entries across 3 versions & 1 rubygems