Module: ThecoreBackendCommons::DefaultModuleRegistry::InheritedHook
- Defined in:
- lib/thecore_backend_commons/default_module_registry.rb
Overview
Prepended onto ApplicationRecord.singleton_class (see .install!)
so that every subsequent subclass definition applies the registry.
Calls super first so it composes correctly with ActiveRecord's own
inherited (which sets up base_class, STI bookkeeping, ...) and with
any other gem's pre-existing inherited override further up the
singleton-class ancestor chain.
Instance Method Summary collapse
Instance Method Details
#inherited(subclass) ⇒ Object
54 55 56 57 |
# File 'lib/thecore_backend_commons/default_module_registry.rb', line 54 def inherited(subclass) super ThecoreBackendCommons::DefaultModuleRegistry.apply_to(subclass) end |