diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-18 19:31:17 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-18 19:31:17 -0700 |
commit | 4054435b28d0abbad0278dbdec3d432a284c8959 (patch) | |
tree | 3f904968be5732161e4c05be52715340467c55ca /activerecord/lib/active_record | |
parent | b1b42b55e211fb210e309385a079470ea855e33e (diff) | |
parent | 50444204cc907e3335d113043acabd439639b9e1 (diff) | |
download | rails-4054435b28d0abbad0278dbdec3d432a284c8959.tar.gz rails-4054435b28d0abbad0278dbdec3d432a284c8959.tar.bz2 rails-4054435b28d0abbad0278dbdec3d432a284c8959.zip |
Merge pull request #1764 from stevehodgkiss/master
Fix inconsistencies with serving images in production mode when ActiveRecord is loaded
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/query_cache.rb | 8 |
2 files changed, 16 insertions, 0 deletions
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 diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb index 4e61671473..e485901440 100644 --- a/activerecord/lib/active_record/query_cache.rb +++ b/activerecord/lib/active_record/query_cache.rb @@ -33,6 +33,14 @@ module ActiveRecord @target = target end + def method_missing(method_sym, *arguments, &block) + @target.send(method_sym, *arguments, &block) + end + + def respond_to?(method_sym, include_private = false) + super || @target.respond_to?(method_sym) + end + def each(&block) @target.each(&block) end |