instance method
inherited
Ruby on Rails 3.2.22.5
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 19
def inherited(klass)
helpers = _helpers
klass._helpers = Module.new { include helpers }
klass.class_eval { default_helper_module! unless anonymous? }
super
end
Defined in actionpack/lib/abstract_controller/helpers.rb line 19
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Helpers::ClassMethods