Permalink
Browse files

match Rails' transaction method signature by accepting an optional op…

…tions parameter

In Rails 3.1 the options parameter is always sent, so transactions were completely
broken until now.
  • Loading branch information...
1 parent 3ceb7bd commit 326488b7651de74d6c9b0c865e769e7bec658ed5 @aduffeck aduffeck committed Oct 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/multi_db/active_record_extensions.rb
@@ -18,7 +18,7 @@ def reload(options = nil)
module ClassMethods
# Make sure transactions always switch to the master
- def transaction(&block)
+ def transaction(options = {}, &block)
if self.connection.kind_of?(ConnectionProxy)
super
else
@@ -51,4 +51,4 @@ def connection
end
end
end
-end
+end

0 comments on commit 326488b

Please sign in to comment.