Module: ViewComponentSubtemplates::AfterCompileHook
- Defined in:
- lib/view_component_subtemplates.rb
Overview
Module to extend ViewComponent::Base class methods This hooks into the after_compile class method from ViewComponent PR #2411
Instance Method Summary collapse
Instance Method Details
#after_compile ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/view_component_subtemplates.rb', line 27 def after_compile super # Process subtemplates for all ancestors (top to bottom) and self ancestors.select { |a| a.is_a?(Class) && a < ViewComponent::Base } .reverse .each { |ancestor| ViewComponentSubtemplates::CompilerExtension.process_component(ancestor) } end |