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.
Your options are:
prepend
happens before alias_method
alias_method
invocation: rewrite to the modern & better prepend
prepend
invocation: rewrite to the legacy alias_method