Sha256: ac6c1fc085eb9711dfafe7308957ab636d2dc3cee2d7e2168d3362f3c25cc0f9

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 Bytes

Contents

module FreshConnection
  module Extend
    module ArStatementCache
      def self.included(base)
        base.alias_method_chain :execute, :fresh_connection
      end

      def execute_with_fresh_connection(params, klass, connection)
        klass.manage_access(klass.all.enable_slave_access) do
          execute_without_fresh_connection(params, klass, connection)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fresh_connection-0.3.0 lib/fresh_connection/extend/ar_statement_cache.rb