Skip to content
This repository
Browse code

Association Proxy should not undefine the default respond_to_missing

  • Loading branch information...
commit 710dcf826a073720b817389fe1b7013fb87be659 1 parent 3bb1ad3
authored November 03, 2010 tenderlove committed November 04, 2010
2  activerecord/lib/active_record/associations/association_proxy.rb
@@ -53,7 +53,7 @@ class AssociationProxy #:nodoc:
53 53
       alias_method :proxy_respond_to?, :respond_to?
54 54
       alias_method :proxy_extend, :extend
55 55
       delegate :to_param, :to => :proxy_target
56  
-      instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|proxy_/ }
  56
+      instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|^respond_to_missing|proxy_/ }
57 57
 
58 58
       def initialize(owner, reflection)
59 59
         @owner, @reflection = owner, reflection

0 notes on commit 710dcf8

Please sign in to comment.
Something went wrong with that request. Please try again.