Sha256: 0b029733ff924428afb8e4e2543f42b5fc5018b62242107e561118e1517d45a8

Contents?: true

Size: 883 Bytes

Versions: 5

Compression:

Stored size: 883 Bytes

Contents

# frozen_string_literal: true

require "rails/generators"
require "rails/generators/migration"
require "active_record"
require "rails/generators/active_record"
require "generators/audited/migration"
require "generators/audited/migration_helper"

module VelocityAudited
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      include VelocityAudited::Generators::MigrationHelper
      extend VelocityAudited::Generators::Migration

      class_option :audited_changes_column_type, type: :string, default: "text", required: false
      class_option :audited_user_id_column_type, type: :string, default: "integer", required: false

      source_root File.expand_path("../templates", __FILE__)

      def copy_migration
        migration_template "install.rb", "db/migrate/install_audited.rb"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
velocity_audited-6.0.4 lib/generators/audited/install_generator.rb
velocity_audited-6.0.3 lib/generators/audited/install_generator.rb
velocity_audited-6.0.1 lib/generators/audited/install_generator.rb
velocity_audited-5.1.6 lib/generators/audited/install_generator.rb
velocity_audited-5.1.5 lib/generators/audited/install_generator.rb