Created
October 13, 2012 13:20
-
-
Save d11wtq/3884609 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 DataMapper | |
class Transaction | |
def link_with_master_slave(*things) | |
things = things.collect do |t| | |
case t | |
when DataMapper::Adapters::MasterSlaveAdapter | |
t.master | |
else | |
t | |
end | |
end | |
link_without_master_slave(*things) | |
end | |
alias_method_chain :link, :master_slave | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment