Sha256: 4baf14b674237dd0e3a679fedcd5e5216bd5e0eeb619aba73d45070683e35a94

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require "active_record"
require "active_record/connection_adapters/postgresql/schema_dumper"
require "active_record/connection_adapters/postgresql/schema_statements"
require "active_record/connection_adapters/postgresql_adapter"
require "active_support/lazy_load_hooks"

ActiveSupport.on_load(:active_record) do
  require "active_record/pg_enum/command_recorder"
  require "active_record/pg_enum/postgresql_adapter"
  require "active_record/pg_enum/schema_dumper"
  require "active_record/pg_enum/schema_statements"
  require "active_record/pg_enum/helper"

  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES.merge!(enum: { name: "enum" })

  ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaDumper.prepend ActiveRecord::PGEnum::SchemaDumper

  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include ActiveRecord::PGEnum::PostgreSQLAdapter
  ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include ActiveRecord::PGEnum::SchemaStatements
  ActiveRecord::Migration::CommandRecorder.include ActiveRecord::PGEnum::CommandRecorder
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activerecord-pg_enum-0.2.0 lib/active_record/pg_enum.rb
activerecord-pg_enum-0.1.1 lib/active_record/pg_enum.rb
activerecord-pg_enum-0.1.0 lib/active_record/pg_enum.rb