Module: Switchman::ActiveRecord::CollectionAssociation

Defined in:
lib/switchman/active_record/association.rb

Instance Method Summary collapse

Instance Method Details

#get_recordsObject



44
45
46
47
48
49
# File 'lib/switchman/active_record/association.rb', line 44

def get_records
  shards = reflection.options[:multishard] && owner.respond_to?(:associated_shards) ? owner.associated_shards : [owner.shard]
  Shard.with_each_shard(shards, [klass.shard_category]) do
    super
  end
end