Now I try to overwrite a class's private class
method(ActiveRecord::Base),but it seems doesn't work,look this
scenario:
1. module Dummy
2. private
3. def method_has
4. puts "new methods has"
5. end
6.
7. def method_not_has
8. puts "method not has"
9. end
10. end
1. class Sample
2. class<<self
3. private
4. def method_has
5. puts "method has"
6. end
7. end
8. end
9.
10. Sample.extend Dummy
11.
12. Sample.send(:method_not_has)=>"method not has"
13.
14. Sample.send(:method_has)=>"method has"
but what I want is method_has return the string "new method has",How?
Why?