Skip to content

Instantly share code, notes, and snippets.

@sycobuny
Created April 13, 2011 17:56
Show Gist options
  • Save sycobuny/918019 to your computer and use it in GitHub Desktop.
Save sycobuny/918019 to your computer and use it in GitHub Desktop.
module Sequel
class Database
alias :old_synchronize synchronize
def synchronize(server=nil, &block)
ret = nil
old_synchronize(server) do |connection|
connection.exec("SET search_path = #{Coleoptera::SSP}")
ret = block.call(connection)
connection.exec("RESET ALL")
end
ret
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment