Sha256: fa9c730510149247037a0a2b3cf0c43572280bcb71967dd9b1f0615184203044

Contents?: true

Size: 754 Bytes

Versions: 8

Compression:

Stored size: 754 Bytes

Contents

require 'active_support'

ActiveSupport.on_load(:active_record) do
  require 'fresh_connection/extend/ar_base'
  require 'fresh_connection/extend/ar_relation'
  require 'fresh_connection/extend/ar_relation_merger'
  require 'fresh_connection/extend/ar_statement_cache'
  require 'fresh_connection/extend/ar_abstract_adapter'

  ActiveRecord::Base.extend FreshConnection::Extend::ArBase
  ActiveRecord::Relation.send :prepend, FreshConnection::Extend::ArRelation
  ActiveRecord::Relation::Merger.send :prepend, FreshConnection::Extend::ArRelationMerger
  ActiveRecord::StatementCache.send :prepend, FreshConnection::Extend::ArStatementCache
  ActiveRecord::ConnectionAdapters::AbstractAdapter.send :prepend, FreshConnection::Extend::ArAbstractAdapter
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fresh_connection-2.4.4 lib/fresh_connection/extend.rb
fresh_connection-2.4.3 lib/fresh_connection/extend.rb
fresh_connection-2.4.2 lib/fresh_connection/extend.rb
fresh_connection-2.4.1 lib/fresh_connection/extend.rb
fresh_connection-2.4.0 lib/fresh_connection/extend.rb
fresh_connection-2.4.0.rc4 lib/fresh_connection/extend.rb
fresh_connection-2.4.0.rc3 lib/fresh_connection/extend.rb
fresh_connection-2.4.0.rc1 lib/fresh_connection/extend.rb