method

read_from_primary

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: Resolver
read_from_primary(&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 48
          def read_from_primary(&blk)
            ActiveRecord::Base.connected_to(role: ActiveRecord::Base.writing_role) do
              ActiveRecord::Base.connection_handler.while_preventing_writes(true) do
                instrumenter.instrument("database_selector.active_record.read_from_primary") do
                  yield
                end
              end
            end
          end
Register or log in to add new notes.