On May 30, 2007, at 7:53 AM, dblack / wobblini.net wrote:

> You could of course shoehorn find_by_* into respond_to? for AR
> objects, if you don't mind, essentially, writing method_missing twice
> (once for real, once as a kind of pseudo-static twin).

I don't really understand this stance.  My opinion is that providing  
a method_missing() implementation is a convenient way for a  
programmer to define a lot of dynamic methods.  This increases the  
messages an object responds to.

Following from that logic, I believe you should also override  
respond_to?() to reflect those new messages.  It's my opinion  
therefore that this thread has exposed a bug in Rails that should be  
patched.

As for the double implementation, I would think we would handle that  
in the usual way.  You use an Extract Method refactoring to pull out  
the matching logic into a separate private method and use that in  
both implementations.

Those are just my opinions though.

James Edward Gray II