aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/dynamic_matchers.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-08-31 11:49:36 -0400
committerSean Griffin <sean@seantheprogrammer.com>2016-08-31 11:50:53 -0400
commit03d3f036a71d433c661d167596989ae6896e911c (patch)
treee24867cde3a00b985bfaeb94cf8215cedb65cd33 /activerecord/lib/active_record/dynamic_matchers.rb
parent4ba40bc2d6c31c1f5c38fe079cc6aaa2ef7ffa33 (diff)
downloadrails-03d3f036a71d433c661d167596989ae6896e911c.tar.gz
rails-03d3f036a71d433c661d167596989ae6896e911c.tar.bz2
rails-03d3f036a71d433c661d167596989ae6896e911c.zip
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.
Diffstat (limited to 'activerecord/lib/active_record/dynamic_matchers.rb')
-rw-r--r--activerecord/lib/active_record/dynamic_matchers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb
index fd2fa7410a..55490e27bc 100644
--- a/activerecord/lib/active_record/dynamic_matchers.rb
+++ b/activerecord/lib/active_record/dynamic_matchers.rb
@@ -2,7 +2,7 @@ require "active_support/core_ext/regexp"
module ActiveRecord
module DynamicMatchers #:nodoc:
- def respond_to?(name, include_private = false)
+ def respond_to_missing?(name, include_private = false)
if self == Base
super
else