Permalink
Browse files

Association Proxy should not undefine the default respond_to_missing

  • Loading branch information...
sblackstone authored and tenderlove committed Nov 3, 2010
1 parent 3bb1ad3 commit 710dcf826a073720b817389fe1b7013fb87be659
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 710dcf8

Please sign in to comment.