diff options
Diffstat (limited to 'activerecord/lib/active_record/dynamic_matchers.rb')
-rw-r--r-- | activerecord/lib/active_record/dynamic_matchers.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/dynamic_matchers.rb b/activerecord/lib/active_record/dynamic_matchers.rb index fd2fa7410a..bbd8ca2377 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 @@ -63,10 +63,10 @@ module ActiveRecord def define model.class_eval <<-CODE, __FILE__, __LINE__ + 1 - def self.#{name}(#{signature}) - #{body} - end - CODE + def self.#{name}(#{signature}) + #{body} + end + CODE end private |