Sha256: e839e2e41d2966b28fae39ddf67e3f3de1b86a73583344b3fc0effcfd56721c4

Contents?: true

Size: 596 Bytes

Versions: 9

Compression:

Stored size: 596 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
          end
        end
      end
    end

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

        ActiveRecord::Base.singleton_class.prepend(
          Arel::Middleware::ActiveRecordExtension,
        )
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arel_toolkit-0.4.9 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.8 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.7 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.6 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.5 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.4 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.3 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.2 lib/arel/middleware/railtie.rb
arel_toolkit-0.4.1 lib/arel/middleware/railtie.rb