From a44e62befd4fea60375f41ea129fd39a00cbf505 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 30 Apr 2017 01:41:32 +0900 Subject: Remove `method_missing` in `Relation::Delegation` The `method_missing` is never reached since 64c53d7c. --- activerecord/lib/active_record/relation/delegation.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb index 257ae04ff4..d08475710e 100644 --- a/activerecord/lib/active_record/relation/delegation.rb +++ b/activerecord/lib/active_record/relation/delegation.rb @@ -115,15 +115,5 @@ module ActiveRecord def respond_to_missing?(method, _) super || @klass.respond_to?(method) || arel.respond_to?(method) end - - def method_missing(method, *args, &block) - if @klass.respond_to?(method) - scoping { @klass.public_send(method, *args, &block) } - elsif arel.respond_to?(method) - arel.public_send(method, *args, &block) - else - super - end - end end end -- cgit v1.2.3