Sha256: 60ef4b769e1fae103e04edf7c98782fdc1046ff846ab539b16a5a91cd6832d45

Contents?: true

Size: 582 Bytes

Versions: 3

Compression:

Stored size: 582 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators'
require 'rails/generators/migration'
require 'rails/generators/active_record'

module DelayedJobGroupsPlugin
  class InstallGenerator < Rails::Generators::Base
    include Rails::Generators::Migration

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

    def create_migration_file
      migration_template('migration.rb', 'db/migrate/create_delayed_job_groups.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

Version Path
delayed_job_groups_plugin-0.4.3 lib/generators/delayed_job_groups_plugin/install_generator.rb
delayed_job_groups_plugin-0.4.2 lib/generators/delayed_job_groups_plugin/install_generator.rb
delayed_job_groups_plugin-0.4.1 lib/generators/delayed_job_groups_plugin/install_generator.rb