method

set_shard

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: ShardSelector
set_shard(shard, &block) 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/shard_selector.rb, line 53
        def set_shard(shard, &block)
          ActiveRecord::Base.connected_to(shard: shard.to_sym) do
            ActiveRecord::Base.prohibit_shard_swapping(options.fetch(:lock, true), &block)
          end
        end
Register or log in to add new notes.