Sha256: bbf1397a1b90a88c58ee6093d66a0a8db0298b398ca99355c07d3ea25c9a9791
Contents?: true
Size: 800 Bytes
Versions: 44
Compression:
Stored size: 800 Bytes
Contents
# frozen_string_literal: true require "rails/generators/active_record" module AcidicJob module Generators class InstallGenerator < ::Rails::Generators::Base include ActiveRecord::Generators::Migration source_root File.expand_path("templates", __dir__) desc "Generates a migration for the AcidicJob::Run table." # Copies the migration template to db/migrate. def copy_acidic_job_runs_migration_files migration_template "create_acidic_job_runs_migration.rb.erb", "db/migrate/create_acidic_job_runs.rb", migration_version: migration_version end protected def migration_version "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end end end end
Version data entries
44 entries across 44 versions & 1 rubygems