Sha256: 20afd1b665951861831d30fd164870ee2ece335d522b9d72f4b87d625a32e1cb
Contents?: true
Size: 403 Bytes
Versions: 17
Compression:
Stored size: 403 Bytes
Contents
module Octopus::AssociationCollection def should_wrap_the_connection? @owner.respond_to?(:current_shard) && @owner.current_shard != nil end def count(*args) if should_wrap_the_connection? Octopus.using(@owner.current_shard) { super } else super end end end ActiveRecord::Associations::AssociationCollection.send(:include, Octopus::AssociationCollection)
Version data entries
17 entries across 17 versions & 1 rubygems