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)
  # Inherited from parent by default
  klass._helpers = nil
  klass.class_eval { default_helper_module! } unless klass.anonymous?
  super
end