Module: ActiveRecordShards::DefaultReplicaPatches::AssociationsAssociationGetRecordsPatch
- Defined in:
- lib/active_record_shards/default_replica_patches.rb
Instance Method Summary collapse
-
#get_records ⇒ Object
rubocop:disable Naming/AccessorMethodName.
- #on_replica_unless_tx ⇒ Object
Instance Method Details
#get_records ⇒ Object
rubocop:disable Naming/AccessorMethodName
214 215 216 217 218 219 220 |
# File 'lib/active_record_shards/default_replica_patches.rb', line 214 def get_records # rubocop:disable Naming/AccessorMethodName if klass on_replica_unless_tx { super } else super end end |
#on_replica_unless_tx ⇒ Object
222 223 224 |
# File 'lib/active_record_shards/default_replica_patches.rb', line 222 def on_replica_unless_tx klass.on_replica_unless_tx { yield } end |