Sha256: 39437efe3f46bb4c1af81e6bde8bf5296f5cb752b2dca4873b529bd51f48b2ca

Contents?: true

Size: 601 Bytes

Versions: 4

Compression:

Stored size: 601 Bytes

Contents

require 'active_record'
require 'fresh_connection/extend/ar_base'
require 'fresh_connection/extend/ar_relation'
require 'fresh_connection/extend/ar_abstract_adapter'

module ActiveRecord
  Base.extend FreshConnection::Extend::ArBase
  Relation.send :prepend, FreshConnection::Extend::ArRelation

  if defined?(StatementCache)
    require 'fresh_connection/extend/ar_statement_cache'
    StatementCache.send :prepend, FreshConnection::Extend::ArStatementCache
  end

  ConnectionAdapters::AbstractAdapter.send :prepend, FreshConnection::Extend::ArAbstractAdapter

  Base.establish_fresh_connection
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fresh_connection-2.0.3 lib/fresh_connection/extend.rb
fresh_connection-2.0.2 lib/fresh_connection/extend.rb
fresh_connection-2.0.1 lib/fresh_connection/extend.rb
fresh_connection-2.0.0 lib/fresh_connection/extend.rb