unknown wrote:
> I'm not sure that's working the way you think it is.  When you call
> super in method_missing, it's calling Object#method_missing, which
> really just lives to be overridden.  (Or is there some other layer
> added in there somewhere?)  Also, if a dynamic method of the same name
> has been defined on the array, then method_missing won't get called in
> the first place :-)
> David

I've got it all bundled in a module, so it could be applied to another 
class that did have a meaningful method_missing, but for Array your 
point is valid.

By "dynamic method" I mean methods like find_by_<attr_name> in 
ActiveRecord - methods that are accepted by the method_missing but don't 
exist, rather than methods that are dynamically added to the class at 
some point. Sorry if that's the wrong name for them.

Having said all that, I don't think this is working for associations on 
ActiveRecords (which are just Arrays). I'm still investigating, but 
perhaps rails adds its own method_missing that is negating this one?

Nic

-- 
Posted via http://www.ruby-forum.com/.