method

set_shard

set_shard(shard, &block)
private

No documentation available.

# File activerecord/lib/active_record/middleware/shard_selector.rb, line 55
        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