From 03d3f036a71d433c661d167596989ae6896e911c Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Wed, 31 Aug 2016 11:49:36 -0400 Subject: Override `respond_to_missing?` instead of `respond_to?` when possible This was almost every case where we are overriding `respond_to?` in a way that mirrors a parallel implementation of `method_missing`. There is one remaining case in Active Model that should probably do the same thing, but had a sufficiently strange implementation that I want to investigate it separately. Fixes #26333. --- activerecord/lib/active_record/migration/command_recorder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/migration') diff --git a/activerecord/lib/active_record/migration/command_recorder.rb b/activerecord/lib/active_record/migration/command_recorder.rb index 6b2c5d8da5..7e60aabc2d 100644 --- a/activerecord/lib/active_record/migration/command_recorder.rb +++ b/activerecord/lib/active_record/migration/command_recorder.rb @@ -92,7 +92,7 @@ module ActiveRecord send(method, args, &block) end - def respond_to?(*args) # :nodoc: + def respond_to_missing?(*args) # :nodoc: super || delegate.respond_to?(*args) end -- cgit v1.2.3