Created
April 13, 2011 17:56
-
-
Save sycobuny/918019 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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