Sha256: 5fb222ab426eb6067d62d989344f0a835f5e85457b2ec76c7cb3f10e2dde17f3

Contents?: true

Size: 764 Bytes

Versions: 95

Compression:

Stored size: 764 Bytes

Contents

require 'active_support/per_thread_registry'

module ActiveRecord
  # This is a thread locals registry for Active Record. For example:
  #
  #   ActiveRecord::RuntimeRegistry.connection_handler
  #
  # returns the connection handler local to the current thread.
  #
  # See the documentation of <tt>ActiveSupport::PerThreadRegistry</tt>
  # for further details.
  class RuntimeRegistry # :nodoc:
    extend ActiveSupport::PerThreadRegistry

    attr_accessor :connection_handler, :sql_runtime, :connection_id

    [:connection_handler, :sql_runtime, :connection_id].each do |val|
      class_eval %{ def self.#{val}; instance.#{val}; end }, __FILE__, __LINE__
      class_eval %{ def self.#{val}=(x); instance.#{val}=x; end }, __FILE__, __LINE__
    end
  end
end

Version data entries

95 entries across 91 versions & 8 rubygems

Version Path
activerecord-4.2.4 lib/active_record/runtime_registry.rb
activerecord-4.1.13 lib/active_record/runtime_registry.rb
activerecord-4.2.4.rc1 lib/active_record/runtime_registry.rb
activerecord-4.1.13.rc1 lib/active_record/runtime_registry.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/activerecord-4.2.3/lib/active_record/runtime_registry.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/activerecord-4.2.3/lib/active_record/runtime_registry.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activerecord-4.2.2/lib/active_record/runtime_registry.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activerecord-4.2.1/lib/active_record/runtime_registry.rb
activerecord-4.2.3 lib/active_record/runtime_registry.rb
activerecord-4.1.12 lib/active_record/runtime_registry.rb
activerecord-4.2.3.rc1 lib/active_record/runtime_registry.rb
activerecord-4.1.12.rc1 lib/active_record/runtime_registry.rb
activerecord-4.2.2 lib/active_record/runtime_registry.rb
activerecord-4.1.11 lib/active_record/runtime_registry.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.1/lib/active_record/runtime_registry.rb
activerecord-4.1.10 lib/active_record/runtime_registry.rb
activerecord-4.2.1 lib/active_record/runtime_registry.rb
activerecord-4.1.10.rc4 lib/active_record/runtime_registry.rb
activerecord-4.2.1.rc4 lib/active_record/runtime_registry.rb
activerecord-4.1.10.rc3 lib/active_record/runtime_registry.rb