This project is archived and is in readonly mode.
AssociationProxy#method_missing masks method_missing in models
-
Steven Soroka
patch attached
-
Steven Soroka
- Tag set to 3.0, active_record, association_proxy, method_missing, nomethoderror
-
Steven Soroka
- State changed from new to invalid
gah. I found a problem with this. If the method is there and it calls something else that raises a NoMethodError, the method_missing here makes it seem as if it's @target's problem, when it's not.
koz suggested instead just overriding responds_to? in your model if you're going to override method_missing, so that they match on which methods they respond to. Seems like a better approach.
[state:invalid]
-
Birkir A. Barkarson
This patch seems to do it for me. Wouldn't removing the rescue bit help with the other problem?
