method

connecting_to

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ConnectionHandling
connecting_to(role: default_role, shard: default_shard, prevent_writes: false) public

Use a specified connection.

This method is useful for ensuring that a specific connection is being used. For example, when booting a console in readonly mode.

It is not recommended to use this method in a request since it does not yield to a block like connected_to.

Show source
Register or log in to add new notes.