Permalink
Browse files

Association Proxy should not undefine the default respond_to_missing

  • Loading branch information...
1 parent e6abfc4 commit 7ab940c7ad8e93b15d638e92c5e29bd85968f21a sblackstone committed with tenderlove Nov 3, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/association_proxy.rb
@@ -53,7 +53,7 @@ class AssociationProxy #:nodoc:
alias_method :proxy_respond_to?, :respond_to?
alias_method :proxy_extend, :extend
delegate :to_param, :to => :proxy_target
- instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|proxy_/ }
+ instance_methods.each { |m| undef_method m unless m.to_s =~ /^(?:nil\?|send|object_id|to_a)$|^__|^respond_to_missing|proxy_/ }
def initialize(owner, reflection)
@owner, @reflection = owner, reflection

0 comments on commit 7ab940c

Please sign in to comment.