alias_method makes a copy of a method. This works fine until the same method is overridden using prepend. If the prepend is executed after alias_method, you'll either see an infinite loop, or loose the prepended functionality.
Solution
Your options are:
- Ensure 
prependhappens beforealias_method - If you can control the 
alias_methodinvocation: rewrite to the modern & betterprepend - If you can only control the 
prependinvocation: rewrite to the legacyalias_method 
Posted by Dominik Schöler to makandra dev (2023-07-31 08:13)