Sha256: f1ccb428b41d01d688d50e71f992f4631b02043c29e1eb058df2f4cbf09178d3

Contents?: true

Size: 859 Bytes

Versions: 20

Compression:

Stored size: 859 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 Audited
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      include Audited::Generators::MigrationHelper
      extend Audited::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

20 entries across 20 versions & 2 rubygems

Version Path
audited-5.8.0 lib/generators/audited/install_generator.rb
audited-5.7.0 lib/generators/audited/install_generator.rb
audited-5.6.0 lib/generators/audited/install_generator.rb
audited-5.5.1.pre lib/generators/audited/install_generator.rb
audited-5.5.0 lib/generators/audited/install_generator.rb
audited-5.4.3 lib/generators/audited/install_generator.rb
audited-5.4.2 lib/generators/audited/install_generator.rb
audited-5.4.1 lib/generators/audited/install_generator.rb
audited-5.4.0 lib/generators/audited/install_generator.rb
audited-5.3.3 lib/generators/audited/install_generator.rb
audited-5.3.2 lib/generators/audited/install_generator.rb
audited-5.3.1 lib/generators/audited/install_generator.rb
audited-5.3.0 lib/generators/audited/install_generator.rb
audited-5.2.0 lib/generators/audited/install_generator.rb
audited-5.1.0 lib/generators/audited/install_generator.rb
velocity_audited-5.1.4 lib/generators/audited/install_generator.rb
velocity_audited-5.1.3 lib/generators/audited/install_generator.rb
audited-5.0.2 lib/generators/audited/install_generator.rb
audited-5.0.1 lib/generators/audited/install_generator.rb
audited-5.0.0 lib/generators/audited/install_generator.rb