How do I find where a ruby method is declared?

Posted by Joe Fair on Stack Overflow See other posts from Stack Overflow or by Joe Fair
Published on 2010-04-13T15:29:46Z Indexed on 2010/04/13 15:33 UTC
Read the original article Hit count: 151

Filed under:

I have a ruby method (deactivate!) that is on an activeRecord class. However, I can't seem to find where that method is declared.

There have been numerous developers on this project, so it could be anywhere. There is a deactivate! on an unrelated class, but it doesn't seem to get called.

Any ideas how to find all the superclasses for an instace, or where to find the code for deactivate!?

© Stack Overflow or respective owner

Related posts about ruby