I am trying to implement the inherited method for ActionController::Base class. My purpose is to call methods on classes that inherit from ActionController::Base like ApplicationController to make them include certain modules. At the momement my Code looks like this:
module MyModule
def inherited(child)
end
def my_test_method()
end
end
ActionController::Base.send(:extend, MyModule)
ActionController::Base.methods.include? 'my_test_method'
=> true
ActionController::Base.methods.include? 'inherited'
=> false
The code is called out of an init file of a plugin.