Docs on dynamic methods?


#1

With ActionMailer, you can do:

Mailer::deliver_member_registration

and it sends an email by apparently first calling the
member_registration method. The only
documentation of this I’ve seen is in example code.

I’ve also seen code like Member.find_by_username_and_email - is that a
so-called “dynamic” method
(apparently calling ‘find’ with username and email parameters)? I don’t
think I’ve come across
documentation explaining the hows and whys of such methods.

thanks
csn


Yahoo! DSL ? Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com


#2

I’ve also seen code like Member.find_by_username_and_email - is that a
so-called “dynamic” method
(apparently calling ‘find’ with username and email parameters)? I don’t
think I’ve come across
documentation explaining the hows and whys of such methods.

They both use the method_missing feature of Ruby