Sha256: e8448bec0205475bf9cbf251a2ac5ce2573037d4df0ce6421b9ee9a5324d3935
Contents?: true
Size: 828 Bytes
Versions: 7
Compression:
Stored size: 828 Bytes
Contents
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
7 entries across 7 versions & 1 rubygems