I'm trying to override a Rails helper method that's defined like this:
class Foo
module Bar
def orig
# orig code
end
alias o orig
module_function :o
module_function :orig
end
end
So that I can override and add functionality to orig
and o
something like this:
def orig
# new code
# super (run orig code)
end
alias o orig
I've looked through several different monkey patching methods but they don't seem to work. I believe the module_function
is what's throwing it off.
Anyone know how I can achieve this?