From 3da56b7ec800a2c8639a9d66ffa69b496736c954 Mon Sep 17 00:00:00 2001 From: Florent Ferry Date: Fri, 10 Nov 2023 17:49:50 +0100 Subject: [PATCH] Add compatibility with Zeitwerk --- lib/komponent/component_renderer.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/komponent/component_renderer.rb b/lib/komponent/component_renderer.rb index f343ebf..76a8973 100644 --- a/lib/komponent/component_renderer.rb +++ b/lib/komponent/component_renderer.rb @@ -42,10 +42,7 @@ def _render(component, locals = {}, options = {}, &block) parts = component.split("/") component_name = parts.join("_") - component_module_path = resolved_component_path(component) - .join("#{component_name}_component") - require_dependency(component_module_path) - component_module = "#{component_name}_component".camelize.constantize + component_module = "#{component}/#{component_name}_component".classify.constantize @context.view_flow = @view_flow if @view_flow @context.class_eval { prepend component_module }