From 50444204cc907e3335d113043acabd439639b9e1 Mon Sep 17 00:00:00 2001 From: Steve Hodgkiss Date: Sat, 18 Jun 2011 22:30:01 +0100 Subject: Fix inconsistencies by being polite to the wrapped body. Needed for Rack::Sendfile to function properly. See issue #1761. --- .../active_record/connection_adapters/abstract/connection_pool.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index dd1d2d4fba..090f6bc6fe 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -426,6 +426,14 @@ module ActiveRecord @testing = testing end + def method_missing(method_sym, *arguments, &block) + @body.send(method_sym, *arguments, &block) + end + + def respond_to?(method_sym, include_private = false) + super || @body.respond_to?(method_sym) + end + def each(&block) body.each(&block) end -- cgit v1.2.3