instance method
inherited
Ruby on Rails 6.1.7.10
Since v3.0.20Signature
inherited(klass)
When a class is inherited, wrap its helper module in a new module. This ensures that the parent class’s module can be changed independently of the child class’s.
Parameters
-
klassreq
Source
# File actionpack/lib/abstract_controller/helpers.rb, line 47
def inherited(klass)
# Inherited from parent by default
klass._helpers = nil
klass.class_eval { default_helper_module! } unless klass.anonymous?
super
end
Defined in actionpack/lib/abstract_controller/helpers.rb line 47
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Helpers::ClassMethods