Rail Class name to File name

Can anyone please tell me which function in Rail that convert the class
name into the file name

This shoud do the trick:

classname = "foo"
filname = classname.underscore

tisp