Sha256: a63f70249cd461cbb3b9599e768dff7f96c5c0bd06da45b6e1eab8f2d9d29007

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 Bytes

Contents

module Arel
  module Middleware
    if defined? Rails::Railtie
      class Railtie < Rails::Railtie
        initializer 'arel.middleware.insert' do
          ActiveSupport.on_load :active_record do
            Arel::Middleware::Railtie.insert_postgresql
          end
        end
      end
    end

    class Railtie
      def self.insert_postgresql
        ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(
          Arel::Middleware::PostgreSQLAdapter,
        )
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arel_toolkit-0.4.0 lib/arel/middleware/railtie.rb