Sha256: 33c6dc1468598044aabc346e27718c88e1648c188cf5d44b8c50c11becc558b8
Contents?: true
Size: 632 Bytes
Versions: 12
Compression:
Stored size: 632 Bytes
Contents
require 'rails/generators' require 'rails/generators/active_record' module GoodJob class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration class << self delegate :next_migration_number, to: ActiveRecord::Generators::Base end source_paths << File.join(File.dirname(__FILE__), "templates") def create_migration_file migration_template 'migration.rb.erb', 'db/migrate/create_good_jobs.rb', migration_version: migration_version end private def migration_version "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end end end
Version data entries
12 entries across 12 versions & 1 rubygems