Module: Switchman::ActiveRecord::CollectionAssociation

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

Instance Method Summary collapse

Instance Method Details

#get_recordsObject



55
56
57
58
59
60
# File 'lib/switchman/active_record/association.rb', line 55

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