I'm trying to decorate a controller from another rails engine. I have one controller method that I want to extend with just one more line. I rather not duplicate the whole original controller method.
This is what I tried:
Backend::BaseContentsController.class_eval do
def booking_update
# do some stuff
update
end
alias_method :update, :booking_update
end
Unfortunately this throws the exception stack level too deep
. Normally with inheritance I could just call super. What would be ideal to do in my case?