Permalink
Browse files

implement ConnectionProxy#respond_to? and #methods so they delegate t…

…o the actual connection object
  • Loading branch information...
1 parent 14da49b commit 2010036c59893e7dda03c0b4949a7fa39b4f6144 @mislav committed Mar 20, 2009
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/active_reload/connection_proxy.rb
@@ -94,6 +94,14 @@ def transaction(start_db_transaction = true, &block)
def method_missing(method, *args, &block)
current.send(method, *args, &block)
end
+
+ def respond_to?(method)
+ super or current.respond_to?(method)
+ end
+
+ def methods
+ super | current.methods
+ end
end
module ActiveRecordConnectionMethods

0 comments on commit 2010036

Please sign in to comment.