Skip to content

Commit

Permalink
Add compatibility with Zeitwerk
Browse files Browse the repository at this point in the history
  • Loading branch information
florentferry committed Nov 10, 2023
1 parent 3c80ff3 commit 3da56b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/komponent/component_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 3da56b7

Please sign in to comment.