search for: func_called

Displaying 1 result from an estimated 1 matches for "func_called".

Did you mean: func_callerid
2006 Nov 16
2
dynamically adding static (class) methods to a class
...goes anyways... I want to intercept all calls to non existent class methods and then call an existing class method with the non existent name. In code... class MyModel < ActiveRecord::Base def MyModel.method_missing(symbol, *args) MyModel.func(symbol.id2name) end def MyModel.func(func_called) puts "You called #{func_called}" end end When I try this code, it gets lost in recursion. Thanks for the help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group...