method

read_from_replica

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Resolver
read_from_replica(&blk) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/middleware/database_selector/resolver.rb, line 62
          def read_from_replica(&blk)
            ActiveRecord::Base.connected_to(role: ActiveRecord.reading_role, prevent_writes: true) do
              instrumenter.instrument("database_selector.active_record.read_from_replica", &blk)
            end
          end
Register or log in to add new notes.