Method: AbstractController::Helpers::ClassMethods#inherited
- Defined in:
- lib/abstract_controller/helpers.rb
#inherited(klass) ⇒ Object
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.
68 69 70 71 72 73 74 |
# File 'lib/abstract_controller/helpers.rb', line 68 def inherited(klass) # Inherited from parent by default klass._helpers = nil klass.class_eval { default_helper_module! } unless klass.anonymous? super end |