module AbstractController::Helpers::ClassMethods

def inherited(klass)

independently of the child class's.
This ensures that the parent class's module can be changed
When a class is inherited, wrap its helper module in a new module.
def inherited(klass)
  helpers = _helpers
  klass._helpers = Module.new { include helpers }
  klass.class_eval { default_helper_module! } unless klass.anonymous?
  super
end