Topic: method_missing feature

Re: method_missing feature

Here's a great example. Have you used the "find_by_my_column" feature on a model? That method doesn't actually exist, rather Active Record uses the method_missing feature to catch all methods that start with find_by, and dynamically extract the last part and turn it into a query.

Re: method_missing feature

The method_missing feature will catch any method that is called on an object but not found. You create a method called 'method_missing' and you get the name of the method called, and any arguments passed to it. If someone calls a method that doesn't exist, the method_missing method will be called, and you can do anything you want with it.