respond_to?(name, include_private = false)public
This code in this file seems to have a lot of indirection, but the indirection is there to provide extension points for the activerecord-deprecated_finders gem. When we stop supporting activerecord-deprecated_finders (from Rails 5), then we can remove the indirection.
# File activerecord/lib/active_record/dynamic_matchers.rb, line 8 def respond_to?(name, include_private = false) match = Method.match(self, name) match && match.valid? || super end