The Admin class provides the admin_execute method to execute
7 8 9 10 11 12 13
# File 'app/models/pg_rls/admin.rb', line 7 def self.execute(sql = nil) PgRls::Record.connected_to(shard: :admin) do return yield.presence if block_given? PgRls::Record.connection.execute(sql).presence end end