Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Jul 20, 2023
1 parent d384cfe commit ecffaab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/view_component/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def render_parent
target_render = self.class.instance_variable_get(:@__vc_ancestor_calls).reverse[@__vc_parent_render_level]
@__vc_parent_render_level += 1

target_render.bind_call(self)
target_render.bind_call(self, @__vc_variant)
nil
ensure
@__vc_parent_render_level -= 1
end
Expand Down
2 changes: 1 addition & 1 deletion lib/view_component/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def render_template_for(variant = nil)
else
templates.each do |template|
method_name = call_method_name(template[:variant])

redefinition_lock.synchronize do
component_class.silence_redefinition_of_method(method_name)
# rubocop:disable Style/EvalWithLocation
Expand Down

0 comments on commit ecffaab

Please sign in to comment.