Sha256: eac413cd32b1eab3e4f5d69e09b40202c7fa8461b86617165f5c8b2be2a38462
Contents?: true
Size: 767 Bytes
Versions: 22
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true module Switchman module GuardRail module Relation def exec_queries(*args) if self.lock_value db = Shard.current(shard_category).database_server if ::GuardRail.environment != db.guard_rail_environment return db.unguard { super } end end super end %w{update_all delete_all}.each do |method| class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{method}(*args) db = Shard.current(shard_category).database_server if ::GuardRail.environment != db.guard_rail_environment db.unguard { super } else super end end RUBY end end end end
Version data entries
22 entries across 22 versions & 1 rubygems