Using Ruby 1.8.6 / Rails 2.3.2
I notice that any method called for any of my ActiveRecord model classes returns nilNoMethodError instead. In addition, it is annoying, it destroys dynamic searchers ( find_by_name, find_by_idetc.), because they always return nileven where records exist. Standard classes that are not derived from ActiveRecord :: Base are not affected.
Is there any way to track what the mass_method intercepts to ActiveRecord :: Base?
UPDATE:
After switching to 1.8.7, I found (thanks to @MichaelKohl) that the will_paginate plugin handles the method_missing method. But will_paginate has existed in our system (unchanged) for quite some time, and the offender must be something later in the chain. Any ideas how to see what comes next in this chain?
UPDATE:
It turned out that there was a pearl (annotate-2.4.0) that was fixed by the monkey ActiveRecord::Base#method_missingas an empty method. Removing gem solved my problem. Although none of the answers actually found a problem, the answer from @Yanhao was the closest since it took a little tweaking to detect an alias-violating method
source
share