How do I know which modules are associated with ActiveRecord::Base?
I'm having some difficulty locating where methods invoked on ActiveRecord instanc开发者_JAVA百科es are defined. Usually they come from some mixed-in module, but I can't even find documentation indicating which modules are mixed in. Is there documentation anywhere that lists the modules that are mixed into ActiveRecord? Or do I have to open up base.rb to find out?
This is actually just a specific instance of dealing with Rails in general- if I want to find where a method is defined, how to I go about looking for it? Do most people go straight to the code?
The Rails source code can be convoluted for sure. When I get lost I start by going to the Rails API and just do a Ctrl-F and look for the method name. What is the specific method you are asking about?
精彩评论