search for: find_without_something

Displaying 1 result from an estimated 1 matches for "find_without_something".

2006 Feb 01
7
Explanation of "alias_method"
...ethod isn''t called twice alias_method :find_without_someting, :find alias_method :find, :find_with_someting end end end module ClassMethods # :nodoc: def find_with_something(*args) p "0" x = find_without_something(*args) p "1" return x end end end ------------------------------------------------------ After including this script I called: ------------------------------------------------------ p " --> find" user = User.find(1) p " --> find...