Sha256: f6bdf0ee367cdffb52577b0e5d1d94bc0276c638a33d39e5621265964122be15

Contents?: true

Size: 521 Bytes

Versions: 2

Compression:

Stored size: 521 Bytes

Contents

require 'pg_inheritance/active_record/schema_statements'
require 'pg_inheritance/active_record/schema_dumper'

module PGInheritance
  class Railtie < Rails::Railtie
    initializer 'pg_inheritance' do
      ActiveSupport.on_load(:active_record) do
        adapter_klass = ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

        adapter_klass.prepend(PGInheritance::ActiveRecord::SchemaStatements)

        ::ActiveRecord::SchemaDumper.prepend(PGInheritance::ActiveRecord::SchemaDumper)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pg_inheritance-0.1.2 lib/pg_inheritance/railtie.rb
pg_inheritance-0.1.1 lib/pg_inheritance/railtie.rb