Actions
Refactor #21205
closedReplace alias_method_chain with Module prepend
Difficulty:
Triaged:
Description
One of the reasons is to remove the rails 5 deprecation. The other is the tests
in against foreman on ruby 2.2.2 currently failing on
in HostTest.test_0100_#reload drops primary and provision interface cache expected exactly once, invoked once: #<Host::Managed:0x1cf9a8a0>.drop_provision_interface_cache(any_parameters) (Minitest::Assertion)
The issues seems to be caused by super in https://github.com/theforeman/foreman/blob/715d097cbd058d171c8a2c65ad5d519d128d1123/app/models/host/base.rb#L290
calling the very same method once again, when called from `refresh_with_remote_execution`. Replacing alias_method_chain
with
prepend seemed to help with the issue
Actions