Module: ActiveRecordShards::DefaultReplicaPatches::AssociationsPreloaderAssociationAssociatedRecordsByOwnerPatch
- Defined in:
- lib/active_record_shards/default_replica_patches.rb
Instance Method Summary collapse
Instance Method Details
#associated_records_by_owner(preloader) ⇒ Object
171 172 173 174 175 176 177 |
# File 'lib/active_record_shards/default_replica_patches.rb', line 171 def associated_records_by_owner(preloader) if klass on_replica_unless_tx { super } else super end end |
#on_replica_unless_tx ⇒ Object
179 180 181 |
# File 'lib/active_record_shards/default_replica_patches.rb', line 179 def on_replica_unless_tx klass.on_replica_unless_tx { yield } end |